![]() |
Trax3 3.1.0
trax track library
|
Value type, dependend from dimensions. More...
#include <C:/Trend/Development/Trax3/Code/dim/DimensionedValues.h>

Public Types | |
| typedef Real | real_type |
Public Member Functions | |
| constexpr Real | Units () const noexcept |
| constexpr | operator Real () const noexcept |
| Explicit conversion to Real for static_cast<Real> and operator (Real). | |
| constexpr | operator bool () const noexcept |
| Explicit conversion to bool for logical expressions like if( !value ) etc. | |
Construction | |
Constructors declared explicit to prevent silent conversions | |
| constexpr | Value (const float units) noexcept |
| constexpr | Value (const double units) noexcept |
| constexpr | Value (const int units) noexcept |
|
inlineexplicitconstexprnoexcept |
Explicit conversion to Real for static_cast<Real> and operator (Real).
This operator is provided mainly for internal type conversion to the underlying physics engine (which clearly uses the same units as trax) and in some template metaprogramming situations; you should not use it elsewhere. Try _xy(Value) instead if you know the expected unit xy; at least use Value::Units() but be aware that the library can change the units it actually uses. Uncomment the deprecated clause to get compile time messages.
|
inlineconstexprnoexcept |
For internal use only. Try _X() to get a Real number in units of 'X'.