mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-23 19:39:45 +02:00
* patch by Rika for ArcTan2 to reduce code size
This commit is contained in:
parent
f18d6f1c85
commit
306559667c
@ -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}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user