xo-unit: doc tidying
This commit is contained in:
parent
d36829994f
commit
b4d490ed3c
4 changed files with 17 additions and 19 deletions
|
|
@ -15,4 +15,3 @@ xo_docdir_sphinx_config(
|
|||
development.rst
|
||||
ubuntu-github-workflow.rst
|
||||
)
|
||||
#xo_utest_coverage_config2()
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ namespace xo {
|
|||
return quantity<s_scaled_unit, r_repr_type>(this->scale_ / x);
|
||||
}
|
||||
|
||||
/** create quantity representing dimensionless value @x divided by this quantity
|
||||
/** create quantity representing dimensionless value @p x divided by this quantity
|
||||
*
|
||||
* @pre x must be an arithmetic type such as @c int or @c double
|
||||
**/
|
||||
|
|
@ -515,7 +515,7 @@ namespace xo {
|
|||
/** @addtogroup quantity-operators **/
|
||||
///@{
|
||||
|
||||
/** note: won't have constexpr result w/ fractional dimension until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
/** note: won't have constexpr result w/ fractional dimension until c++26 (when @c sqrt(), @c pow() are constexpr)
|
||||
**/
|
||||
template <typename Q1, typename Q2>
|
||||
requires (quantity_concept<Q1>
|
||||
|
|
@ -548,7 +548,7 @@ namespace xo {
|
|||
|
||||
/** divide quantity @p x by quantity @p y.
|
||||
*
|
||||
* note: won't have constexpr result w/ fractional dimension until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
* note: won't have constexpr result w/ fractional dimension until c++26 (when @c sqrt(), @c pow() are constexpr)
|
||||
**/
|
||||
template <typename Q1, typename Q2>
|
||||
requires (quantity_concept<Q1>
|
||||
|
|
@ -582,7 +582,7 @@ namespace xo {
|
|||
/** add quantity @p y to quantity @p x. Result will have the same units as @p x.
|
||||
* Representation will be the widest of {@c x::repr_type, @c y::repr_type}.
|
||||
*
|
||||
* note: won't have constexpr result w/ fractional dimension until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
* note: won't have constexpr result w/ fractional dimension until c++26 (when @c sqrt(), @c pow() are constexpr)
|
||||
*
|
||||
* @pre @p x and @p y expected to have consistent dimensions
|
||||
**/
|
||||
|
|
@ -634,7 +634,7 @@ namespace xo {
|
|||
/** subtract quantity @p y from quantity @p x. Result will have the same units as @p x.
|
||||
* Representation will be the widest of {@c x::repr_type, @c y::repr_type}
|
||||
*
|
||||
* note: won't have constexpr result w/ fractional dimension until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
* note: won't have constexpr result w/ fractional dimension until c++26 (when @c sqrt(), @c pow() are constexpr)
|
||||
*
|
||||
* @pre @p x and @p y expected to have consistent dimensions
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace xo {
|
||||
namespace qty {
|
||||
/** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
/** note: won't have constexpr result until c++26 (when @c sqrt(), @c pow() are constexpr)
|
||||
**/
|
||||
template <typename Quantity, typename Quantity2>
|
||||
requires quantity_concept<Quantity> && quantity_concept<Quantity2>
|
||||
|
|
@ -19,7 +19,7 @@ namespace xo {
|
|||
return (Quantity::compare(x, y) == 0);
|
||||
}
|
||||
|
||||
/** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
/** note: won't have constexpr result until c++26 (when @c sqrt(), @c pow() are constexpr)
|
||||
**/
|
||||
template <typename Quantity, typename Quantity2>
|
||||
requires quantity_concept<Quantity> && quantity_concept<Quantity2>
|
||||
|
|
|
|||
|
|
@ -86,11 +86,11 @@ namespace xo {
|
|||
|
||||
///@}
|
||||
|
||||
/** defgroup xqautnity-constants static xquantity constants **/
|
||||
/** @defgroup xquantity-constants static xquantity constants **/
|
||||
///@{
|
||||
|
||||
/** false since unit information may be unknown at compile time.
|
||||
* Coordinates with quantity::always_constexpr_unit
|
||||
* Coordinates with @c quantity::always_constexpr_unit
|
||||
**/
|
||||
static constexpr bool always_constexpr_unit = false;
|
||||
|
||||
|
|
@ -112,10 +112,7 @@ namespace xo {
|
|||
|
||||
///@}
|
||||
|
||||
/** @defgroup xquantity-methods xquantity methods **/
|
||||
///@{
|
||||
|
||||
/** @defgroup xquantity-arithmetic-support **/
|
||||
/** @defgroup xquantity-arithmetic-support**/
|
||||
///@{
|
||||
|
||||
/** create unit quantity with same unit as @c this **/
|
||||
|
|
@ -273,6 +270,9 @@ namespace xo {
|
|||
}
|
||||
}
|
||||
|
||||
/** @defgroup xquantity-comparison-support xquantity comparison support methods **/
|
||||
///@{
|
||||
|
||||
/** perform 3-way comparison between @c xquantity values @p x and @p y **/
|
||||
template <typename Quantity2>
|
||||
static constexpr
|
||||
|
|
@ -303,9 +303,8 @@ namespace xo {
|
|||
*this = *this / x;
|
||||
return *this;
|
||||
}
|
||||
///@}
|
||||
|
||||
// TODO: operator+=, operator-=
|
||||
///@}
|
||||
|
||||
private:
|
||||
/** @defgroup xquantity-instance-vars **/
|
||||
|
|
@ -319,7 +318,7 @@ namespace xo {
|
|||
///@}
|
||||
}; /*xquantity*/
|
||||
|
||||
/** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
/** note: won't have constexpr result until c++26 (when @c sqrt(), @c pow() are constexpr)
|
||||
**/
|
||||
template <typename Repr = double,
|
||||
typename Int = std::int64_t>
|
||||
|
|
@ -331,7 +330,7 @@ namespace xo {
|
|||
u.natural_unit_);
|
||||
}
|
||||
|
||||
/** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
/** note: won't have constexpr result until c++26 (when @c sqrt(), @c pow() are constexpr)
|
||||
**/
|
||||
template <typename Repr = double,
|
||||
typename Int = std::int64_t>
|
||||
|
|
@ -340,7 +339,7 @@ namespace xo {
|
|||
return xquantity<Repr, Int>(1.0, nu);
|
||||
}
|
||||
|
||||
/** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
/** note: won't have constexpr result until c++26 (when @c sqrt(), @c pow() are constexpr)
|
||||
**/
|
||||
template <typename Q1, typename Q2>
|
||||
requires (quantity_concept<Q1>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue