length_squaredReturns the square of the length of a vector. This is faster than length because it avoids a costly square root computation. It can be used to compare lengths when you are only concerned with which of two vectors is longer, and not what their actual lengths are.
vectorThe input vector.
length_squaredThe sum of the squares of all vector components.