GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::physics::Absolute< UnitT > Struct Template Reference

The canonical unit type corresponding to a given unit with its magnitude made absolute. More...

#include <GREM/physics/quantities.hpp>

Inheritance diagram for grem::physics::Absolute< UnitT >:

Public Member Functions

consteval Absolute (UnitT other)
 Implicitly convert a unit to its absolute unit.
Public Member Functions inherited from grem::physics::BaseUnit< UnitT::DIMENSION, Magnitude< UnitT::MagnitudeType::VALUE, true >{}>
consteval operator OtherUnitT () const
 Implicitly convert this unit to another unit, where allowed.
consteval auto operator+ () const
 Get the canonical unit resulting from taking the additive identity of a quantity of this unit.
consteval auto operator- () const
 Get the canonical unit resulting from taking the additive inverse of a quantity of this unit.
consteval auto operator+ (const OtherUnitT &other) const
 Get the canonical unit resulting from adding a quantity of another unit to a quantity of this unit.
consteval auto operator- (const OtherUnitT &other) const
 Get the canonical unit resulting from subtracting a quantity of another unit from a quantity of this unit.
consteval auto operator* (const OtherUnitT &other) const
 Get the canonical unit resulting from multiplying a quantity of this unit with a quantity of another unit.
consteval auto operator/ (const OtherUnitT &other) const
 Get the canonical unit resulting from dividing a quantity of this unit by a quantity of another unit.

Static Public Member Functions

static constexpr auto getSymbolString ()
 Get an ASCII string representation of the unit symbol of this unit, e.g. "kg m^2/s" if D is ANGULAR_MOMENTUM and M is 1.
Static Public Member Functions inherited from grem::physics::BaseUnit< UnitT::DIMENSION, Magnitude< UnitT::MagnitudeType::VALUE, true >{}>
static constexpr auto getSymbolString ()
 Get an ASCII string representation of the unit symbol of this unit, e.g. "kg m^2/s" if D is ANGULAR_MOMENTUM and M is 1.

Additional Inherited Members

Public Types inherited from grem::physics::BaseUnit< UnitT::DIMENSION, Magnitude< UnitT::MagnitudeType::VALUE, true >{}>
using DimensionType
 Dimension type of the unit.
using MagnitudeType
 Magintude type of the unit.
Static Public Attributes inherited from grem::physics::BaseUnit< UnitT::DIMENSION, Magnitude< UnitT::MagnitudeType::VALUE, true >{}>
static constexpr DimensionType DIMENSION
 Dimension of the unit.
static constexpr MagnitudeType MAGNITUDE
 Magintude of the unit.

Detailed Description

template<typename UnitT>
struct grem::physics::Absolute< UnitT >

The canonical unit type corresponding to a given unit with its magnitude made absolute.

Template Parameters
UnitTunit type to get the absolute unit of.

Constructor & Destructor Documentation

◆ Absolute()

template<typename UnitT>
grem::physics::Absolute< UnitT >::Absolute ( UnitT other)
inlineconsteval

Implicitly convert a unit to its absolute unit.

Parameters
otherunit to convert.

Member Function Documentation

◆ getSymbolString()

template<typename UnitT>
constexpr auto grem::physics::Absolute< UnitT >::getSymbolString ( )
inlinestaticnodiscardconstexpr

Get an ASCII string representation of the unit symbol of this unit, e.g. "kg m^2/s" if D is ANGULAR_MOMENTUM and M is 1.

Returns
a String or StringView of the unit symbol string.

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