|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Physical magnitude type template. More...
#include <GREM/physics/quantities.hpp>
Public Member Functions | |
| consteval bool | operator== (const Magnitude &other) const noexcept |
| Compare this magnitude to another for equality. | |
| template<long double OtherValue, bool OtherIsAbsolute> | |
| consteval bool | operator== (const Magnitude< OtherValue, OtherIsAbsolute > &other) const noexcept |
| Compare this magnitude to another for equality. | |
| consteval auto | operator+ () const |
| Get the magnitude resulting from taking the additive identity of a quantity of this magnitude. | |
| consteval auto | operator- () const |
| Get the magnitude resulting from taking the additive inverse of a quantity of this magnitude. | |
| template<long double OtherValue, bool OtherIsAbsolute> | |
| consteval auto | operator+ (const Magnitude< OtherValue, OtherIsAbsolute > &other) const |
| Get the magnitude resulting from adding a quantity of another magnitude to a quantity of this magnitude. | |
| template<long double OtherValue, bool OtherIsAbsolute> | |
| consteval auto | operator- (const Magnitude< OtherValue, OtherIsAbsolute > &other) const |
| Get the magnitude resulting from subtracting a quantity of another magnitude from a quantity of this magnitude. | |
| template<long double OtherValue, bool OtherIsAbsolute> | |
| consteval auto | operator* (const Magnitude< OtherValue, OtherIsAbsolute > &other) const |
| Get the magnitude resulting from multiplying a quantity of this magnitude with a quantity of another magnitude. | |
| template<long double OtherValue, bool OtherIsAbsolute> | |
| consteval auto | operator/ (const Magnitude< OtherValue, OtherIsAbsolute > &other) const |
| Get the magnitude resulting from dividing a quantity of this magnitude by a quantity of another magnitude. | |
Static Public Attributes | |
| static constexpr long double | VALUE = Value |
| Quantity multiplier of the magnitude. | |
| static constexpr bool | IS_ABSOLUTE = IsAbsolute |
| Simplified indicator of the magnitude's reference frame (true for global world space, false for other). | |
Friends | |
| consteval auto | sqrt (const Magnitude &magnitude) |
| Get the magnitude resulting from taking the square root of a quantity of a magnitude. | |
Physical magnitude type template.
Part of the definition of a physical unit type.
| Value | quantity multiplier. |
| IsAbsolute | simplified indicator of the magnitude's reference frame (true for global world space, false for other). |
|
inlinenodiscardconstevalnoexcept |
Compare this magnitude to another for equality.
| other | the magnitude to compare this one to. |
|
inlinenodiscardconstevalnoexcept |
Compare this magnitude to another for equality.
| other | the magnitude to compare this one to. |
|
inlinenodiscardconsteval |
Get the magnitude resulting from taking the additive identity of a quantity of this magnitude.
| physics::Error | if the additive identity cannot be taken. |
|
inlinenodiscardconsteval |
Get the magnitude resulting from taking the additive inverse of a quantity of this magnitude.
| physics::Error | if the additive inverse cannot be taken. |
|
inlinenodiscardconsteval |
Get the magnitude resulting from adding a quantity of another magnitude to a quantity of this magnitude.
| other | the magnitude to add to this one. |
| physics::Error | if quantities of the given magnitudes cannot be added. |
|
inlinenodiscardconsteval |
Get the magnitude resulting from subtracting a quantity of another magnitude from a quantity of this magnitude.
| other | the magnitude to subtract from this one. |
| physics::Error | if quantities of the given magnitudes cannot be subtracted. |
|
inlinenodiscardconsteval |
Get the magnitude resulting from multiplying a quantity of this magnitude with a quantity of another magnitude.
| other | the magnitude to multiply this one with. |
| physics::Error | if quantities of the given magnitudes cannot be multiplied. |
|
inlinenodiscardconsteval |
Get the magnitude resulting from dividing a quantity of this magnitude by a quantity of another magnitude.
| other | the magnitude to divide this one by. |
| physics::Error | if quantities of the given magnitudes cannot be divided. |
|
friend |
Get the magnitude resulting from taking the square root of a quantity of a magnitude.
| magnitude | the magnitude to take the square root of. |
|
staticconstexpr |
Quantity multiplier of the magnitude.
|
staticconstexpr |
Simplified indicator of the magnitude's reference frame (true for global world space, false for other).