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

This commit is contained in:
wp_xyz 2025-02-03 10:30:08 +01:00
parent 6c528d9822
commit 1dcfd1a774

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);