Graphic Delphi

Title: Rotate a Point in 2D
Procedure Rotate(RotAng:Double; x,y:Double; Var Nx,Ny:Double);
Var SinVal:Double;
CosVal:Double;
Begin
RotAng := RotAng*PIDiv180;
SinVal := Sin(RotAng);
CosVal := Cos(RotAng);
Nx := x*CosVal - y*SinVal;
Ny := y*CosVal + x*SinVal;
End;
(* End Of Rotate Cartesian Point*)