WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
units::unit_value_subtract< U1, U2 > Struct Template Reference

subtracts two unit_value_t types at compile-time More...

#include <units/base.h>

Inheritance diagram for units::unit_value_subtract< U1, U2 >:

Static Public Member Functions

static constexpr const unit_t< unit_type > value () noexcept
 Value of difference.
 

Detailed Description

template<class U1, class U2>
struct units::unit_value_subtract< U1, U2 >

subtracts two unit_value_t types at compile-time

The resulting unit will the the unit_type of U1

Template Parameters
U1left-hand unit_value_t
U2right-hand unit_value_t
See also
unit_value_t_traits to access information about the properties of the class, such as it's unit type and rational value.
Note
very similar in concept to std::ratio_subtract

Member Function Documentation

◆ value()

template<class U1 , class U2 >
static constexpr const unit_t< unit_type > units::unit_value_subtract< U1, U2 >::value ( )
inlinestaticconstexprnoexcept

Value of difference.

Returns the calculated value of the difference of U1 and U2, in the same units as U1.

Returns:
Value of the difference in the appropriate units.

The documentation for this struct was generated from the following file: