From a75b08b76f91451bb586b154fdca872955d8a57a Mon Sep 17 00:00:00 2001 From: KT Date: Tue, 21 Sep 2021 10:05:57 -0500 Subject: publish a2 --- dev/MinGfx/src/gfxmath.cc | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'dev/MinGfx/src/gfxmath.cc') diff --git a/dev/MinGfx/src/gfxmath.cc b/dev/MinGfx/src/gfxmath.cc index 11180e6..28cfedf 100644 --- a/dev/MinGfx/src/gfxmath.cc +++ b/dev/MinGfx/src/gfxmath.cc @@ -19,6 +19,61 @@ const float GfxMath::PI = 3.14159265359f; const float GfxMath::TWO_PI = 6.28318530718f; const float GfxMath::HALF_PI = 1.57079632679f; +float GfxMath::sin(float a) { +#ifdef WIN32 + return std::sinf(a); +#else + return std::sin(a); +#endif +} + +float GfxMath::cos(float a) { +#ifdef WIN32 + return std::cosf(a); +#else + return std::cos(a); +#endif +} + +float GfxMath::tan(float a) { +#ifdef WIN32 + return std::tanf(a); +#else + return std::tan(a); +#endif +} + +float GfxMath::asin(float a) { +#ifdef WIN32 + return std::asinf(a); +#else + return std::asin(a); +#endif +} + +float GfxMath::acos(float a) { +#ifdef WIN32 + return std::acosf(a); +#else + return std::acos(a); +#endif +} + +float GfxMath::atan(float a) { +#ifdef WIN32 + return std::atanf(a); +#else + return std::atan(a); +#endif +} + +float GfxMath::atan2(float a, float b) { +#ifdef WIN32 + return std::atan2f(a, b); +#else + return std::atan2(a, b); +#endif +} float GfxMath::Clamp(float x, float a, float b) { return std::min(std::max(x, a), b); -- cgit v1.2.3