guNormalize

guNormalize [Function]

Function

guNormalize

Normalizes a vector

Syntax

#include <ultra64.h>        /* gu.h */
void guNormalize(float *x, float *y, float *z);

Argument

x
Pointer to x component of vector
y
Pointer to y component of vector
z
Pointer to z component of vector

Returned value

None.

Description

Normalizes the 3D vector (makes the size = 1) and returns (x, y, z). When this function is called, the result is the creation of the following type of vector:

Note

Operations cannot be guaranteed when
= 0.

Revision history

03/01/99 Completely rewritten.