Added '_' prefix to sin and cos.

Users complained that otherwise the names might clash with their functions.
This commit is contained in:
Oliver Schmidt
2019-04-13 11:25:54 +02:00
parent cb7882a202
commit ac0b452834
6 changed files with 24 additions and 26 deletions

View File

@@ -70,16 +70,16 @@ void __fastcall__ tgi_arc (int x, int y, unsigned char rx, unsigned char ry,
}
/* Calculate the start coords */
x1 = x + tgi_imulround (rx, cos (sa));
y1 = y - tgi_imulround (ry, sin (sa));
x1 = x + tgi_imulround (rx, _cos (sa));
y1 = y - tgi_imulround (ry, _sin (sa));
do {
sa += inc;
if (sa >= ea) {
sa = ea;
done = 1;
}
x2 = x + tgi_imulround (rx, cos (sa));
y2 = y - tgi_imulround (ry, sin (sa));
x2 = x + tgi_imulround (rx, _cos (sa));
y2 = y - tgi_imulround (ry, _sin (sa));
tgi_line (x1, y1, x2, y2);
x1 = x2;
y1 = y2;

View File

@@ -57,8 +57,8 @@ void __fastcall__ tgi_pieslice (int x, int y, unsigned char rx, unsigned char ry
tgi_arc (x, y, rx, ry, sa, ea);
/* ... and close it */
tgi_line (x, y, x + tgi_imulround (rx, cos (sa)), y - tgi_imulround (ry, sin (sa)));
tgi_line (x, y, x + tgi_imulround (rx, cos (ea)), y - tgi_imulround (ry, sin (ea)));
tgi_line (x, y, x + tgi_imulround (rx, _cos (sa)), y - tgi_imulround (ry, _sin (sa)));
tgi_line (x, y, x + tgi_imulround (rx, _cos (ea)), y - tgi_imulround (ry, _sin (ea)));
}