Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Suggest a change

Vector3.magnitude

var magnitude: float;
float magnitude;
magnitude as float

Description

Returns the length of this vector (Read Only).

The length of the vector is square root of (x*x+y*y+z*z).

If you only need to compare magnitudes of some vectors, you can compare squared magnitudes of them using sqrMagnitude (computing squared magnitudes is faster).

See Also: sqrMagnitude.

Your name (optional):
Your email (optional):
Please write your suggestion here: