Magnitude

The length of a vector: the square root of X squared plus Y squared plus Z squared.

Think of it as How long the walk is.

(a - b).Magnitude is the straight-line distance in studs between two points. Beacon Yard's coin uses it: a touch from more than 12 studs away pays nothing. Comparing X and Z separately is not the same, because the diagonal is longer than either side.

Where the picture breaks

A Vector3 also stores a place: the same three numbers can be a walk from anywhere or a point measured from the origin, and only context says which.

A Vector3 is three numbers. As an offset it is a displacement; as a position it is the displacement from the origin. Subtracting positions gives the offset, and adding an offset to a position gives a new position.

See it with the rest of the analogy cast

Official reference: create.roblox.com

Related terms