WPILibC++ 2023.4.3-108-ge5452e3
Compile-time Unit Manipulators

Defines a series of classes used to manipulate unit_value_t types at compile-time, such as unit_value_add<>, unit_value_sqrt<>, etc. More...

Classes

struct  units::unit_value_add< U1, U2 >
 adds two unit_value_t types at compile-time More...
 
struct  units::unit_value_subtract< U1, U2 >
 subtracts two unit_value_t types at compile-time More...
 
struct  units::unit_value_multiply< U1, U2 >
 multiplies two unit_value_t types at compile-time More...
 
struct  units::unit_value_divide< U1, U2 >
 divides two unit_value_t types at compile-time More...
 
struct  units::unit_value_power< U1, power >
 raises unit_value_to a power at compile-time More...
 
struct  units::unit_value_sqrt< U1, Eps >
 calculates square root of unit_value_t at compile-time More...
 

Detailed Description

Defines a series of classes used to manipulate unit_value_t types at compile-time, such as unit_value_add<>, unit_value_sqrt<>, etc.

Compile-time manipulators can be chained together, e.g. unit_value_sqrt<unit_value_add<unit_value_power<a, 2>, unit_value_power<b, 2>>> to represent `c = sqrt(a^2 + b^2).