Get the n-dimensional normal vector to n-1 direction vectors.
Parameters
dv
Array of n-1 direction vectors
Returns
Normal vector, NULL in the case of error
Overview:
The number of vectors in dv must be n-1, where n is the length of the vectors. All vectors must have the same length.
The number of dimensions must be at least 2.
The number of dimensions n is determined from the first vector in dv.
Mathematical Meaning:
The result vector is also referred to in literature as .
The norm of the result vector equals the (n-1)-dimensional volume of the parallelepiped spanned by the input vectors. This means, parallel input vectors will cause a result vector of zero length.
Note
If the size of dv is less than n-1, the function will crash the application!
Error Handling:
The following error codes can be set by this function:
CPL_ERROR_NULL_INPUT: dv == NULL, or any of the entries of dv is NULL
CPL_ERROR_INCOMPATIBLE_INPUT: not all entries (vectors) of dv have the same size
CPL_ERROR_ILLEGAL_INPUT: the number of dimensions is less than 2