Game dev
Saved & recent

Unit vector

Also called: normalized vector

Related terms: normalizing, magnitude

A vector with a length of exactly 1. It keeps the direction and drops the size. You get one by dividing a nonzero vector by its length, which is called normalizing. The zero vector has no direction to normalize.

Use it when you only care about which way something points. Multiply it by a speed to get a velocity.

n = v / length(v)

Further reading
LearnOpenGL: Transformations: vector normalization
X Y unit circle length 1 length 2
Divide the dashed vector by its length of 2 to reach the unit circle without changing its direction.

View in the full Game dev collection