| Description | uses | Classes, Interfaces, Objects and Records | Functions and Procedures | Types | Constants | Variables |
Unit containing general procedures and functions.
procedure CrossProduct(const a, b: TVector; var Res: TVector); |
function DistanceXY(const X1, Y1, X2, Y2: real): real; |
function DotProduct(const a, b: TVector): real; |
procedure Normalize(var v: TVector); |
procedure PlaneRotationZ(const X, Y, Angle: real; var Xnew, Ynew: real); |
function Sgn(r: real): integer; |
procedure CrossProduct(const a, b: TVector; var Res: TVector); |
Procedure for calculating the cross product between two vectors.
The 3D vector Res containing the resulting cross product a x b.
function DistanceXY(const X1, Y1, X2, Y2: real): real; |
Calculates the distance between the points (X1,Y1) and (X2,Y2).
function DotProduct(const a, b: TVector): real; |
Calculates the dot product between the two 3D-vectors a and b.
procedure Normalize(var v: TVector); |
Normalizes the 3D-vector v. If the vector (v) has a length near zero, the null-vector is returned.
procedure PlaneRotationZ(const X, Y, Angle: real; var Xnew, Ynew: real); |
Rotates the point (X,Y) by an angle (Angle) around the Z-axis. Angle should be given in radians.
The new location of the point as (Xnew,Ynew).
function Sgn(r: real): integer; |
Returns the sign of the supplied argument.
-1 if the value is less than zero and 1 otherwise.