Basis Unit
A unit representing a fixed multiple of a native dimension.
Context
Introduction
A basis_unit represents a unit belonging to a single native dimension.
For example bu::meter representing a distance of 1 meter.
#include <xo/unit/basis_unit.hpp>
basis unit representing 1 minute
basis_unit is intended as an implementation-level abstraction.
Application code will normally interact with the more-capable scaled_unit
instead of basis_unit.
Class
-
class basis_unit
A dimensionless multiple of a single natively-specified basis dimension.
For example “3600 minutes” or “1e-6 grams”.
Members are public so that a
basis_unitinstance qualifies as a ‘structural type’, and therefore may be used as a non-type template parameter.
Member Variables
- group basis_unit instance variables
Constructors
- group basis_unit constructors
Access Methods
- group basis_unit access methods
Comparison
- group basis_unit comparisons
Functions
-
inline bool operator==(const basis_unit &x, const basis_unit &y)
trueiff basis units are equal; both native dimension and scalefactor must be equal
-
inline bool operator!=(const basis_unit &x, const basis_unit &y)
trueiff bass units are not equal
-
inline bool operator==(const basis_unit &x, const basis_unit &y)