![]() |
ToyGine2 26.2.0
Game Engine for retro consoles
|
General math utilities: abs, isEqual, deg2rad, rad2deg. More...
Go to the source code of this file.
Namespaces | |
| namespace | toy |
| Root namespace containing all engine modules. | |
| namespace | toy::math |
| Mathematical types, constants, and utilities: fixed-point, vectors, point. | |
Functions | |
| template<typename T> | |
| constexpr T | toy::math::abs (const T &value) noexcept |
| Returns the absolute value of value. | |
| template<typename T> | |
| constexpr bool | toy::math::isEqual (const T &a, const T &b, T absEpsilon=8 *numeric_limits< T >::epsilon(), T relEpsilon=64 *numeric_limits< T >::epsilon()) noexcept |
| Compares two values for approximate equality. | |
| template<typename T> | |
| constexpr T | toy::math::deg2rad (const T &angle) noexcept |
| Converts angle from degrees to radians. | |
| template<typename T> | |
| constexpr T | toy::math::rad2deg (const T &angle) noexcept |
| Converts angle from radians to degrees. | |