Title: Rotate a Point in 2D around another 2D Point
Procedure Rotate(RotAng:Double; x,y,ox,oy:Double; Var Nx,Ny:Double);
Begin
Rotate(RotAng,x-ox,y-oy,Nx,Ny);
Nx := Nx+ox;
Ny := Ny+oy;
End;
(* End Of Rotate Cartesian Point About Origin *)
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*)