Daniele Bartolini 11 месяцев назад
Родитель
Сommit
24612ccc22
2 измененных файлов с 8 добавлено и 0 удалено
  1. 3 0
      src/core/math/math.h
  2. 5 0
      src/core/math/math.inl

+ 3 - 0
src/core/math/math.h

@@ -26,6 +26,9 @@ f32 ffract(f32 a);
 /// Returns the absolute value of @a a.
 f32 fabs(f32 a);
 
+/// Returns the floating-point remainder of dividing a by b.
+f32 fmod(f32 a, f32 b);
+
 /// Returns the sine of @a a.
 f32 fsin(f32 a);
 

+ 5 - 0
src/core/math/math.inl

@@ -29,6 +29,11 @@ inline f32 fabs(f32 a)
 	return ::fabsf(a);
 }
 
+inline f32 fmod(f32 a, f32 b)
+{
+	return ::fmod(a, b);
+}
+
 inline f32 fsin(f32 a)
 {
 	return sinf(a);