Techneck/code/source-c/utility/math.c

19 lines
302 B
C
Raw Permalink Normal View History

#include <utility/math.h>
f32_t tc_deg_to_rad(f32_t degrees)
{
return (degrees / 360.0f) * (3.1415 * 2.0f);
}
f32_t tc_rad_to_deg(f32_t radians)
{
return radians / (3.1415*2.0f) * 360.0f;
}
2023-10-17 20:13:54 +00:00
i64_t tc_min(i64_t first, i64_t second)
{
if(first < second) return first;
return second;
}