18 lines
606 B
C
18 lines
606 B
C
#ifndef MATH_UTILS_H
|
|
#define MATH_UTILS_H
|
|
|
|
#include "aliases.h"
|
|
#include <math.h>
|
|
|
|
#define RADIANS(DEG) (DEG * (f32)M_PI / 180.0f)
|
|
#define swap(T, v1, v2) \
|
|
{ \
|
|
T tmp = v1; \
|
|
v1 = v2; \
|
|
v2 = tmp; \
|
|
}
|
|
|
|
f32 clamp(f32 value, f32 min, f32 max);
|
|
|
|
#endif // !MATH_UTILS_H
|