Vector.Normalize
From GMod Wiki
Function | |
Syntax | Vector:Normalize( ) |
Description: | |
Will convert the vector into a normalized vector | |
Returns: | Vector |
In Object: | Vector |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Vector.Normalize]Vector.Normalize [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Normalizes a vector |
---|---|
Used on | |
Code | local vec = Vector( 300, 150, 150 ):Normalize(); |
Output | Vector( 1, 0.5, 0.5 ) |
Additional Notes
- Unlike Vector:GetNormal(), which only returns a value, Vector:Normalize() will also modify the original vector.