length_squared

Returns 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.

Input

vector

The input vector.

Output

length_squared

The sum of the squares of all vector components.