Math functions.
#include <srl_math.hpp>
Classes | |
class | Random |
Pseudo-Random number generator. More... | |
Static Public Member Functions | |
template<typename ValueType > | |
static constexpr ValueType | Abs (const ValueType &value) |
Get absolute value. | |
template<typename ValueType > | |
static constexpr ValueType | Clamp (const ValueType &minimum, const ValueType &maximum, const ValueType &value) |
Clamp value in the range. | |
static const Types::Fxp | Cos (Types::Angle angle) |
Cosine operation. | |
template<typename ValueType > | |
static constexpr ValueType | Max (const ValueType &first, const ValueType &second) |
Get maximum value of two values. | |
template<typename ValueType > | |
static constexpr ValueType | Min (const ValueType &first, const ValueType &second) |
Get minimum value of two values. | |
static const Types::Fxp | Sin (Types::Angle angle) |
Sinus operation. | |
static SRL::Types::Fxp | Tan (const SRL::Types::Angle &angle) |
Tangent from angle. | |
|
inlinestaticconstexpr |
Get absolute value.
ValueType | Type of the value |
value | Numeric value |
|
inlinestaticconstexpr |
Clamp value in the range.
ValueType | Type of the value |
minimum | Minimum of the range |
maximum | Maximum of the range |
value | Value to clamp |
|
inlinestatic |
Cosine operation.
angle | Angle value |
|
inlinestaticconstexpr |
Get maximum value of two values.
ValueType | Type of the value |
first | First value |
second | Second value |
|
inlinestaticconstexpr |
Get minimum value of two values.
ValueType | Type of the value |
first | First value |
second | Second value |
|
inlinestatic |
Sinus operation.
angle | Angle value |
|
inlinestatic |
Tangent from angle.
angle | Angle value |