#ifndef EGG_MATH_H #define EGG_MATH_H #include #include namespace EGG { template class Math { public: static T maxNumber() { // TODO: Generalize to other classes // This is low priority since it will always be a float return 3.402823466e+38f; } static T pi() { return 3.14159265f; } static T pi_half() { return pi() / 2.0f; } static T epsilon() { return 1.192092896e-07f; } static T inv(T t) { return 1 / t; } static T abs(T t) { return t > 0 ? t : -t; } static T sqrt(T); static T sin(T); static T cos(T); static T tan(T); static T asin(T); static T acos(T); static T atan2(T, T); static T log10(T); static T gcd(T, T); static T lcm(T, T); }; // There is // Math::zero // Math::pi_half // Math::neg(f32) // Math::abs(f32) // f32 impls // /* 8049ab60 */ Math::sqrt(f32); // /* 8049abb0 */ Math::sin(f32); // /* 8049abe0 */ Math::cos(f32); // /* 8049ac10 */ Math::acos(f32); // /* 8049ac40 */ Math::atan2(f32, f32); } // namespace EGG #endif