PK_VECTOR_perpendicular   

PK_ERROR_code_t     PK_VECTOR_perpendicular
(
--- received arguments ---
PK_VECTOR1_t        vector1,               --- vector(normalised)
PK_VECTOR_t         vector2,               --- vector

--- returned arguments ---
PK_VECTOR1_t *const perpendicular_vector   --- vector address
)


This function accepts a PK_VECTOR1_t and a PK_VECTOR_t and returns a
pointer to a PK_VECTOR1_t.


Specific Errors:
PK_ERROR_not_a_unit_vector          If vector1 is not normalised
PK_ERROR_vectors_are_parallel       If the vectors are parallel


This function accepts two vectors, the first of which must be normalised, and
produces a third normalised vector which is perpendicular to vector1. If
vector2 is of zero length, then the function will choose an arbitrary
perpendicular vector.  Otherwise, if vector2 is of non-zero length and not
parallel to vector1, then the component of vector2 which is perpendicular to
vector1 determines the direction of the result.