WPILibC++ 2024.1.1-beta-4
units::traits::is_nonlinear_scale< T, Ret > Struct Template Reference

Trait which tests that class T meets the requirements for a non-linear scale. More...

#include <units/base.h>

Inheritance diagram for units::traits::is_nonlinear_scale< T, Ret >:

Detailed Description

template<class T, class Ret>
struct units::traits::is_nonlinear_scale< T, Ret >

Trait which tests that class T meets the requirements for a non-linear scale.

A non-linear scale must:

  • be default constructible
  • have an operator() member which returns the non-linear value stored in the scale
  • have an accessible m_value member type which stores the linearized value in the scale.

Linear/nonlinear scales are used by units::unit to store values and scale them if they represent things like dB.


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