Golias Engine
A C++ 20 'game engine' built with SDL3 with wide platform support.
Namespaces | Macros | Functions | Variables
math.h File Reference
#include "core/math/vector2.h"
#include "core/math/vector3.h"
#include "core/math/vector4.h"
#include "core/math/quaternion.h"
#include "core/math/basis.h"
#include "core/math/matrix4.h"
#include <glm/gtc/type_ptr.hpp>

Go to the source code of this file.

Namespaces

 math
 

Macros

#define GLM_ENABLE_EXPERIMENTAL
 
#define GLM_FORCE_INTRINSICS
 

Functions

float math::sin (float x)
 
float math::cos (float x)
 
float math::tan (float x)
 
float math::asin (float x)
 
float math::acos (float x)
 
float math::atan (float x)
 
float math::atan2 (float y, float x)
 
float math::sinh (float x)
 
float math::cosh (float x)
 
float math::tanh (float x)
 
float math::exp (float x)
 
float math::log (float x)
 
float math::log2 (float x)
 
float math::log10 (float x)
 
float math::pow (float base, float exp)
 
float math::sqrt (float x)
 
float math::cbrt (float x)
 
float math::floor (float x)
 
float math::ceil (float x)
 
float math::round (float x)
 
float math::trunc (float x)
 
template<typename T >
math::min (T a, T b)
 
template<typename T >
math::max (T a, T b)
 
template<typename T >
math::clamp (T value, T min_val, T max_val)
 
float math::abs (float x)
 
int math::abs (int x)
 
template<typename T >
math::sign (T x)
 
template<typename T >
math::lerp (T a, T b, float t)
 
template<typename T >
math::smoothstep (T edge0, T edge1, T x)
 
float math::deg2rad (float degrees)
 
float math::rad2deg (float radians)
 
bool math::is_zero_approx (float x)
 
bool math::is_equal_approx (float a, float b)
 
float math::random (float min_val, float max_val)
 
int math::random (int min_val, int max_val)
 
template<typename T >
math::move_toward (T current, T target, T delta)
 
float math::snap (float value, float step)
 

Variables

constexpr float math::PI = 3.14159265358979323846f
 
constexpr float math::TAU = 6.28318530717958647692f
 
constexpr float math::E = 2.71828182845904523536f
 
constexpr float math::DEG2RAD = PI / 180.0f
 
constexpr float math::RAD2DEG = 180.0f / PI
 
constexpr float math::EPSILON = 1e-6f
 
constexpr float math::INF = __builtin_huge_valf()
 

Macro Definition Documentation

◆ GLM_ENABLE_EXPERIMENTAL

#define GLM_ENABLE_EXPERIMENTAL

◆ GLM_FORCE_INTRINSICS

#define GLM_FORCE_INTRINSICS