Description
Normalizes and returns a vector. Normalizing a vector is the process of making the vector "unit-length", or have a length of 1.
Functional area
Math
Command syntax
Syntax
normalize vector |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
vector | vector | yes | The vector to normalize. |
Flags
None
Return value
vector
Returns a vector of length 1.0.
Examples
// Normalize a vector
vector $vec = << 30, 60, 90 >>;
$vec = `normalize $vec`;
print $vec;