Scaled Unit Constants

Built-in unit constants, for use with conversions

Context

_images/ditaa-5422ce3d37000a795c6aeed82ba629b0af9d1709.png

Introduction

Built-in units. Application code may use these to trigger conversion

#include <xo/unit/quantity.hpp>

using namespace xo::qty;

constexpr quantity<u::meter / u::second> q1 = q::miles(60) / q::hour;

Note that it’s often easiest to use unit quantity constants, like q::hour in the example above

Dimensionless Constant

Warning

doxygengroup: Cannot find group “scaled-unit-dimensionless” in doxygen xml output for project “xodoxxml” from directory: /home/roland/proj/xo/xo-unit/.build-ccov/docs/dox/xml

Mass Units

Warning

doxygengroup: Cannot find group “scaled-unit-mass” in doxygen xml output for project “xodoxxml” from directory: /home/roland/proj/xo/xo-unit/.build-ccov/docs/dox/xml

Distance Units

Warning

doxygengroup: Cannot find group “scaled-unit-distance” in doxygen xml output for project “xodoxxml” from directory: /home/roland/proj/xo/xo-unit/.build-ccov/docs/dox/xml

Time Units

Warning

doxygengroup: Cannot find group “scaled-unit-time” in doxygen xml output for project “xodoxxml” from directory: /home/roland/proj/xo/xo-unit/.build-ccov/docs/dox/xml

Volatility Units

Warning

doxygengroup: Cannot find group “scaled-unit-volatility” in doxygen xml output for project “xodoxxml” from directory: /home/roland/proj/xo/xo-unit/.build-ccov/docs/dox/xml

Miscellaneous Units

Warning

doxygengroup: Cannot find group “scaled-unit-misc” in doxygen xml output for project “xodoxxml” from directory: /home/roland/proj/xo/xo-unit/.build-ccov/docs/dox/xml