procedure TForm1.Button1Click(Sender: TObject); var Angle : Double; x : Double; y : Double; Distance : Double; Radians : Double; begin Distance := 100; Angle := 270; Radians := Angle * DegToRad; x := Round(Distance * Cos(Radians)); y := Round(Distance * Sin(Radians)); ShowMessage(FloatToStr(x) + ' ' + FloatToStr(y)); end; |
[001911]