diff --git a/BAN/include/BAN/Math.h b/BAN/include/BAN/Math.h index 87f09b50a0..0a663471c2 100644 --- a/BAN/include/BAN/Math.h +++ b/BAN/include/BAN/Math.h @@ -325,7 +325,6 @@ namespace BAN::Math template inline constexpr T sin(T x) { - x = fmod(x, (T)2.0 * numbers::pi_v); asm("fsin" : "+t"(x)); return x; } @@ -333,12 +332,16 @@ namespace BAN::Math template inline constexpr T cos(T x) { - if (abs(x) >= (T)9223372036854775808.0) - x = fmod(x, (T)2.0 * numbers::pi_v); asm("fcos" : "+t"(x)); return x; } + template + inline constexpr void sincos(T x, T& sin, T& cos) + { + asm("fsincos" : "=t"(cos), "=u"(sin) : "0"(x)); + } + template inline constexpr T tan(T x) {