LazUtils: Fix calculation error in function LineEndPoint (unit GraphMath). Issue #41400.

(cherry picked from commit 1dcfd1a774)
This commit is contained in:
wp_xyz 2025-02-03 10:30:08 +01:00
parent a16a0665ec
commit e47bef33ea

View File

@ -911,12 +911,6 @@ function LineEndPoint(const StartPoint : TPoint; Angle, Length : Extended) : TPo
var
sinAngle, cosAngle: Extended;
begin
if Angle > 360*16 then
Angle := Frac(Angle / 360*16) * 360*16;
if Angle < 0 then
Angle := 360*16 - abs(Angle);
SinCos(DegToRad(Angle/16), sinAngle, cosAngle);
Result.Y := StartPoint.Y - Round(Length*sinAngle);
Result.X := StartPoint.X + Round(Length*cosAngle);