![]() |
Raven Engine v0.1
|
Fundamental mathematical constants for Crux. More...
Namespaces | |
| namespace | Crux |
Variables | |
| template<typename T> | |
| constexpr T | Crux::Pi = static_cast<T>(3.14159265358979323846) |
| The value of pi. | |
| template<typename T> | |
| constexpr T | Crux::TwoPi = static_cast<T>(6.28318530717958647692) |
| The value of 2pi (two pi). | |
| template<typename T> | |
| constexpr T | Crux::HalfPi = static_cast<T>(1.57079632679489661923) |
| The value of pi/2 (half pi). | |
| template<typename T> | |
| constexpr T | Crux::QuarterPi = static_cast<T>(0.78539816339744830961) |
| The value of pi/4 (quarter pi). | |
| template<typename T> | |
| constexpr T | Crux::InvPi = static_cast<T>(0.31830988618379067153) |
| 1/pi (inverse pi). | |
| template<typename T> | |
| constexpr T | Crux::InvTwoPi = static_cast<T>(0.15915494309189533576) |
| 1/(2pi) (inverse two pi). | |
| template<typename T> | |
| constexpr T | Crux::DegToRad = Pi<T> / static_cast<T>(180) |
| Degrees-to-radians conversion factor (pi/180). | |
| template<typename T> | |
| constexpr T | Crux::RadToDeg = static_cast<T>(180) / Pi<T> |
| Radians-to-degrees conversion factor (180/pi). | |
| template<typename T> | |
| constexpr T | Crux::Sqrt2 = static_cast<T>(1.41421356237309504880) |
| sqrt2 (square root of two). | |
| template<typename T> | |
| constexpr T | Crux::InvSqrt2 = static_cast<T>(0.70710678118654752440) |
| 1/sqrt2 (inverse square root of two). | |
| template<typename T> | |
| constexpr T | Crux::Sqrt3 = static_cast<T>(1.73205080756887729352) |
| sqrt3 (square root of three). | |
| template<typename T> | |
| constexpr T | Crux::InvSqrt3 = static_cast<T>(0.57735026918962576450) |
| 1/sqrt3 (inverse square root of three). | |
| template<typename T> | |
| constexpr T | Crux::E = static_cast<T>(2.71828182845904523536) |
| Euler's number (e). | |
| template<typename T> | |
| constexpr T | Crux::InvE = static_cast<T>(0.36787944117144232159) |
| 1/e (inverse of Euler's number). | |
| template<typename T> | |
| constexpr T | Crux::Ln2 = static_cast<T>(0.69314718055994530942) |
| Natural logarithm of 2 (ln(2)). | |
| template<typename T> | |
| constexpr T | Crux::Ln10 = static_cast<T>(2.30258509299404568402) |
| Natural logarithm of 10 (ln(10)). | |
| template<typename T> | |
| constexpr T | Crux::Log2E = static_cast<T>(1.44269504088896340736) |
| Base-2 logarithm of e (log2(e)). | |
| template<typename T> | |
| constexpr T | Crux::Log10E = static_cast<T>(0.43429448190325182765) |
| Base-10 logarithm of e (log10(e)). | |
| template<typename T> | |
| constexpr T | Crux::Phi = static_cast<T>(1.61803398874989484820) |
| The golden ratio. | |
| template<typename T> | |
| constexpr T | Crux::Epsilon = static_cast<T>(1e-7) |
| Small epsilon for floating-point comparisons. | |
Fundamental mathematical constants for Crux.
Defines high-precision values of pi, conversion factors, square root constants, logarithmic bases, and other commonly used constants in a templated, type-safe manner. All values are constexpr to support compile-time evaluation.