This commit is contained in:
Jorijn van der Graaf 2025-05-05 05:14:39 +02:00
commit 8535fd1211
30 changed files with 1297 additions and 1181 deletions

View file

@ -3,6 +3,7 @@ module;
#include <cstdint>
#include <stdfloat>
#include <numeric>
export module Crafter.Math:Misc;
@ -63,4 +64,8 @@ export namespace Crafter {
float p = ((((-2.6051615e-07f * y2 + 2.4760495e-05f) * y2 - 0.0013888378f) * y2 + 0.041666638f) * y2 - 0.5f) * y2 + 1.0f;
*pCos = sign * p;
}
constexpr float ToRadian(float degrees) {
return degrees * (std::numbers::pi / 180);
}
}