WPILibC++ 2023.4.3-108-ge5452e3
units::linear_scale< T > Struct Template Reference

unit_t scale which is linear More...

#include <units/base.h>

Public Member Functions

constexpr linear_scale ()=default
 default constructor. More...
 
constexpr linear_scale (const linear_scale &)=default
 
 ~linear_scale ()=default
 
linear_scaleoperator= (const linear_scale &)=default
 
template<class... Args>
constexpr linear_scale (const T &value, Args &&...) noexcept
 constructor. More...
 
constexpr T operator() () const noexcept
 returns value. More...
 

Public Attributes

m_value
 linearized value. More...
 

Detailed Description

template<typename T>
struct units::linear_scale< T >

unit_t scale which is linear

Represents units on a linear scale. This is the appropriate unit_t scale for almost all units almost all of the time.

Template Parameters
Tunderlying storage type
See also
unit_t

Constructor & Destructor Documentation

◆ linear_scale() [1/3]

template<typename T >
constexpr units::linear_scale< T >::linear_scale ( )
inlineconstexprdefault

default constructor.

◆ linear_scale() [2/3]

template<typename T >
constexpr units::linear_scale< T >::linear_scale ( const linear_scale< T > &  )
inlineconstexprdefault

◆ ~linear_scale()

template<typename T >
units::linear_scale< T >::~linear_scale ( )
inlinedefault

◆ linear_scale() [3/3]

template<typename T >
template<class... Args>
constexpr units::linear_scale< T >::linear_scale ( const T &  value,
Args &&  ... 
)
inlineconstexprnoexcept

constructor.

Member Function Documentation

◆ operator()()

template<typename T >
constexpr T units::linear_scale< T >::operator() ( ) const
inlineconstexprnoexcept

returns value.

◆ operator=()

template<typename T >
linear_scale & units::linear_scale< T >::operator= ( const linear_scale< T > &  )
inlinedefault

Member Data Documentation

◆ m_value

template<typename T >
T units::linear_scale< T >::m_value

linearized value.


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