|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Physical dimension type template. More...
#include <GREM/physics/quantities.hpp>
Public Member Functions | |
| consteval bool | operator== (const Dimension &other) const noexcept |
| Compare this dimension to another for equality. | |
| template<int OtherMass, int OtherLength, int OtherTime> | |
| consteval bool | operator== (const Dimension< OtherMass, OtherLength, OtherTime > &other) const noexcept |
| Compare this dimension to another for equality. | |
| consteval auto | operator+ () const |
| Get the dimension resulting from taking the additive identity of a quantity of this dimension. | |
| consteval auto | operator- () const |
| Get the dimension resulting from taking the additive inverse of a quantity of this dimension. | |
| consteval auto | operator+ (const Dimension &other) const |
| Get the dimension resulting from adding a quantity of another dimension to a quantity of this dimension. | |
| consteval auto | operator- (const Dimension &other) const |
| Get the dimension resulting from subtracting a quantity of another dimension from a quantity of this dimension. | |
| template<int OtherMass, int OtherLength, int OtherTime> | |
| consteval auto | operator* (const Dimension< OtherMass, OtherLength, OtherTime > &other) const |
| Get the dimension resulting from multiplying a quantity of this dimension with a quantity of another dimension. | |
| template<int OtherMass, int OtherLength, int OtherTime> | |
| consteval auto | operator/ (const Dimension< OtherMass, OtherLength, OtherTime > &other) const |
| Get the dimension resulting from dividing a quantity of this dimension by a quantity of another dimension. | |
Static Public Member Functions | |
| static constexpr auto | getSIUnitSymbolString () |
| Get an ASCII string representation of the symbol of the SI unit for this dimension, e.g. "kg m^2/s" if the dimension is ANGULAR_MOMENTUM. | |
Static Public Attributes | |
| static constexpr int | MASS = Mass |
| Mass exponent of the dimension. | |
| static constexpr int | LENGTH = Length |
| Length exponent of the dimension. | |
| static constexpr int | TIME = Time |
| Time exponent of the dimension. | |
Friends | |
| consteval auto | sqrt (const Dimension &dimension) |
| Get the dimension resulting from taking the square root of a quantity of a dimension. | |
Physical dimension type template.
Part of the definition of a physical unit type.
|
staticnodiscardconstexpr |
Get an ASCII string representation of the symbol of the SI unit for this dimension, e.g. "kg m^2/s" if the dimension is ANGULAR_MOMENTUM.
|
inlinenodiscardconstevalnoexcept |
Compare this dimension to another for equality.
| other | the dimension to compare this one to. |
|
inlinenodiscardconstevalnoexcept |
Compare this dimension to another for equality.
| other | the dimension to compare this one to. |
|
inlinenodiscardconsteval |
Get the dimension resulting from taking the additive identity of a quantity of this dimension.
|
inlinenodiscardconsteval |
Get the dimension resulting from taking the additive inverse of a quantity of this dimension.
|
inlinenodiscardconsteval |
Get the dimension resulting from adding a quantity of another dimension to a quantity of this dimension.
| other | the dimension to add to this one. |
|
inlinenodiscardconsteval |
Get the dimension resulting from subtracting a quantity of another dimension from a quantity of this dimension.
| other | the dimension to subtract from this one. |
|
inlinenodiscardconsteval |
Get the dimension resulting from multiplying a quantity of this dimension with a quantity of another dimension.
| other | the dimension to multiply this one with. |
|
inlinenodiscardconsteval |
Get the dimension resulting from dividing a quantity of this dimension by a quantity of another dimension.
| other | the dimension to divide this one by. |
|
friend |
Get the dimension resulting from taking the square root of a quantity of a dimension.
| dimension | the dimension to take the square root of. |
|
staticconstexpr |
Mass exponent of the dimension.
|
staticconstexpr |
Length exponent of the dimension.
|
staticconstexpr |
Time exponent of the dimension.