Vector/Normalize

From Garry's Mod
Jump to: navigation, search
 Vector:Normalize( )

Description

Normalizes the given vector. This changes the vector you call it on, if you want to return a normalized copy without affecting the original, use Vector:GetNormalized.

Examples

Example

Normalizes Vector(4, 3, 2).

local test = Vector(4, 3, 2)
test:Normalize()
MsgN( test )

Output:

0.7428 0.5571 0.3714.
Personal tools
Navigation