Return the length of the input vector, with three possible distance definitions:

Euclidian

The "ordinary" length of the vector:  \( \sqrt{x^2+y^2+z^2} \)

Quadrance

Euclidian distance squared, which is cheaper to compute:  \( x^2+y^2+z^2 \)

Manhattan

Measures distance following only axis-aligned directions, which is even cheaper to compute:  \( \left|x\right|+\left|y\right|+\left|z\right| \)

 

  • No labels