compositor-test/src/math_utils.c

11 lines
264 B
C

#include "math_utils.h"
#include <math.h>
i32 min(i32 a, i32 b) { return a <= b ? a : b; }
i32 max(i32 a, i32 b) { return a >= b ? a : b; }
f64 radians(f64 degrees) { return degrees * M_PI / 180.0; }
f64 degrees(f64 radians) { return radians * 180.0 / M_PI; }