diff --git a/docs/abstractions.rst b/docs/implementation.rst similarity index 100% rename from docs/abstractions.rst rename to docs/implementation.rst diff --git a/include/xo/unit/scaled_unit.hpp b/include/xo/unit/scaled_unit.hpp index 35ac028e..a0d8a6f8 100644 --- a/include/xo/unit/scaled_unit.hpp +++ b/include/xo/unit/scaled_unit.hpp @@ -29,6 +29,11 @@ namespace xo { 1.0 / outer_scale_sq_); } + /** @brief true iff scaled unit can be faithfully represented by a @ref natural_unit **/ + constexpr bool is_natural() const { + return (outer_scale_factor_ = OuterScale(1) && (outer_scale_sq_ == 1.0)); + } + public: /* need public members so that a scaled_unit instance can be a non-type template parameter (a structural type) */ natural_unit natural_unit_;