Commit 498187eb authored by Deucе's avatar Deucе 👌🏾
Browse files

Fix angle calculations on Win32

Do multiple before divide, and use an lround() to get the same results
on Win32 with mingw32 as Clang on FreeBSD.
parent 2cf9fcbb
Pipeline #2154 passed with stage
in 7 minutes and 30 seconds
......@@ -9869,9 +9869,10 @@ full_ellipse(int xc, int yc, int sa, int ea, int a, int b, bool fill, uint32_t c
double qangle;
 
while(y>=0 && x<=a) {
angle = atan((x * (M_PI / 180.0)) / (y *(M_PI / 180.0)));
angle /= (M_PI / 180.0);
angle = 90 - angle;
angle = atan((x * M_PI / 180.0) / (y * M_PI / 180.0));
angle *= 180.0;
angle /= M_PI;
angle = lround(90.0 - angle);
if (!skip) {
if(x!=0 || y!=0) {
// Top-left quadrant.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment