PEXNormalizeVectors2D(3) — Subroutines
Name
PEXNormalizeVectors2D
Synopsis
int PEXNormalizeVectors2D(int count, PEXVector2D ∗vectors, PEXVector2D ∗vectors_return)
Arguments
countThe number of vectors to normalize
vectorsA pointer to the array of vectors to normalize
vectors_return
A pointer to an array in which to store the normalized vectors
Returns
Zero if successful; otherwise, one of the following:
PEXBadVector - One of the vectors has zero magnitude.
Description
This function normalizes each vector in the specified list of 2D vectors. An error is returned if any vector in the list has a magnitude of zero. All non-zero vectors in the list are still normalized, however.
If the return array is the same as the input array, the function will overwrite the input values with the normalized values.
Errors
None
See Also
PEXTransformVectors2D, PEXNormalizeVectors