GlPortal Class Reference  0.1.1
Source code documentation of the free and open 3D action puzzle game.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | Static Public Attributes
radix::Math Class Reference

Math helper class. More...

#include <external/RadixEngine/include/radix/core/math/Math.hpp>

Static Public Member Functions

static Vector3f toDirection (const Quaternion &orientation)
 
static Vector3f toEuler (const Vector3f &direction)
 
template<typename T >
static constexpr T clamp (T v, T low, T high)
 Restricts a value to a range. More...
 
template<typename T >
static constexpr T sign (T v)
 Returns the sign of value. More...
 

Static Public Attributes

static constexpr float PI = 3.141592653589793238462643383279502884197169399375105820974944592307
 
static constexpr float DEG_TO_RAD = PI / 180
 
static constexpr float RAD_TO_DEG = 180 / PI
 

Detailed Description

Math helper class.

Member Function Documentation

template<typename T >
static constexpr T radix::Math::clamp ( v,
low,
high 
)
inlinestatic

Restricts a value to a range.

Parameters
vValue
lowLow bound
highHigh bound
template<typename T >
static constexpr T radix::Math::sign ( v)
inlinestatic

Returns the sign of value.

Parameters
vvalue
Returns
1 if v is positive -1 if v is negative 0 if v is 0
Vector3f radix::Math::toDirection ( const Quaternion orientation)
static
Vector3f radix::Math::toEuler ( const Vector3f direction)
static

Field Documentation

constexpr float radix::Math::DEG_TO_RAD = PI / 180
static
constexpr float radix::Math::PI = 3.141592653589793238462643383279502884197169399375105820974944592307
static
constexpr float radix::Math::RAD_TO_DEG = 180 / PI
static

The documentation for this class was generated from the following files: