format
typescript
Vector3.Normalize()class: Vector3
description
Normalize a vector.
Normalizing a vector keeps the direction of the original vector but scales its length to 1. By using this method, you can normalize a vector to a unit length, which is useful in many calculations such as direction, projection, etc. If the vector is too small to be normalized, it will be set to 0.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
void |
code example
typescript
let lhs = new Vector3(1,2,3);
lhs.Normalize();
Debug.Log("Normalize is",lhs);