Garry's Mod Wiki

Vector:Normalize

  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.

Example

Normalizes Vector(4, 3, 2).

local test = Vector(4, 3, 2) test:Normalize() MsgN( test )
Output: 0.7428 0.5571 0.3714.