Skip to content
Snippets Groups Projects
Commit 498187eb authored by Deucе's avatar Deucе :ok_hand_tone4:
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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2154 passed
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment