The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



VectorCrossProduct


Unit:SDL_openarrays
Class: none
Declaration: [1] function VectorCrossProduct (Vec1, Vec2: TIntArray; var Product: TIntArray): integer;
[2] function VectorCrossProduct (Vec1, Vec2: TDoubleArray; var Product: TDoubleArray): integer;

The function VectorCrossProduct calculates the cross product of the two one-dimensional arrays Vec1 and Vec2 and returns the result in the variable Product. Please note that the function VectorCrossProduct can only be applied to vectors having 2 or three components.

The function returns the following error codes:

 0 ... everything is OK
-1 ... Vec1 or Vec2 has zero size
-2 ... Vec1 and Vec2 do not have the same number of components
-3 ... only vectors with 2 or 3 components are allowed



Last Update: 2023-Feb-06