* patch by Rika for ArcTan2 to reduce code size

This commit is contained in:
florian 2022-08-11 22:32:45 +02:00
parent f18d6f1c85
commit 306559667c

View File

@ -915,17 +915,16 @@ function arctan2(y,x : float) : float;
else
result:=-pi/2;
end
else
else
begin
if X > 0 then
result:=ArcTan(y/x)
else
if Y < 0.0 then
result:=ArcTan(y/x)-pi
else
result:=ArcTan(y/x)+pi;
end;
end;
result:=ArcTan(y/x);
if x<0 then
if y<0 then
result:=result-pi
else
result:=result+pi;
end;
end;
{$endif FPC_MATH_HAS_ARCTAN2}