Go to: Synopsis. Return value. MEL examples.
int normalize( float $v[] )
int : -1 if the float array was zero length. 1 if the normalized vector was successfully calculated. |
Variable Name | Variable Type | Description |
---|---|---|
$v | float[] | Array of 3 floats to be normalized |
float $v0[] = {3,6,9}; normalize($v0); // Results: 1 //