|
units
Use physical dimensions at compile-time or run-time.
|
Base-struct for wrapper to disambiguate scalar from dimval and protected storage for numeric value associated with a physical unit. More...
#include <number.hpp>
Public Types | |
| using | scalar = T |
| Scalar type. More... | |
Public Member Functions | |
| basic_number () | |
| By default, do not initialize. More... | |
| constexpr | basic_number (T const &vv) |
| Initialize numeric value and exponents of units. More... | |
Public Attributes | |
| T | v_ |
| Numeric value that multiplies units. More... | |
Base-struct for wrapper to disambiguate scalar from dimval and protected storage for numeric value associated with a physical unit.
Specialize descendant as necessary to handle different scalar types; for example, a matrix.
The number is protected because it is here abstracted away from the unit, which it needs in order to make any sense. The number is combined with the unit in a descendant class.
| T | Type of number, typically float or double. |
Definition at line 40 of file number.hpp.
| using vnix::units::basic_number< T >::scalar = T |
Scalar type.
Definition at line 42 of file number.hpp.
|
inline |
By default, do not initialize.
Definition at line 43 of file number.hpp.
|
inline |
Initialize numeric value and exponents of units.
| v | Numeric value that multiplies units. |
Definition at line 47 of file number.hpp.
| T vnix::units::basic_number< T >::v_ |
Numeric value that multiplies units.
Definition at line 41 of file number.hpp.
1.8.11