From 11f3c5231935240becc1e737ce9cdf1d4bee1db7 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Wed, 18 Aug 2021 22:18:54 +0300 Subject: [PATCH] Update Circle.cpp --- module/Base/Circle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/Base/Circle.cpp b/module/Base/Circle.cpp index 258f9fa0..88be8d5d 100644 --- a/module/Base/Circle.cpp +++ b/module/Base/Circle.cpp @@ -481,9 +481,9 @@ Array Circle::ToPointsArray(SQInteger num_segments) const SQFloat theta = 2.0f * SQMOD_PI * static_cast< SQFloat >(i) / static_cast< SQFloat >(num_segments); #endif // SQUSEDOUBLE // Calculate the x component - SQFloat x = (rad * SQMOD_DOUBLE_OR(cos, cosf)(theta)) + pos.x; + SQFloat x = (rad * std::cos(theta)) + pos.x; // Calculate the y component - SQFloat y = (rad * SQMOD_DOUBLE_OR(sin, sinf)(theta)) + pos.y; + SQFloat y = (rad * std::sin(theta)) + pos.y; // Push the Vector2 instance on the stack Var< Vector2 >::push(vm, Vector2{static_cast< Vector2::Value >(x), static_cast< Vector2::Value >(y)}); // Insert the element on the stack into the array