SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Math.hpp File Reference
#include <cmath>
#include <Math/Vector.hpp>

Go to the source code of this file.

Namespaces

namespace  Sleak
 Root namespace for everything the engine exposes.
namespace  Sleak::Math
 Vectors, matrices, quaternions, colors, AABBs, and random helpers.

Macros

#define D2R   PI / 180.0
#define PI   3.14159

Functions

template<typename T>
constexpr const T & Sleak::Math::Clamp (const T &value, T min, T max)
 Clamps value into [min, max].
template<typename T>
constexpr const T & Sleak::Math::Clamp (const T &value, Vector2D range)
 Clamps value into [range.x, range.y].
template<typename T>
constexpr T Sleak::Math::Lerp (const T &start, const T &end, float t)
 Linear interpolation from start to end; t is clamped to [0,1].
template<typename T>
constexpr const T & Sleak::Math::Max (const T &value1, const T &value2)
template<typename T>
constexpr const T & Sleak::Math::Min (const T &value1, const T &value2)

Macro Definition Documentation

◆ D2R

#define D2R   PI / 180.0

Definition at line 8 of file Math.hpp.

◆ PI

#define PI   3.14159

Definition at line 7 of file Math.hpp.