The LengthSquared
property of the Vector2
struct provides the squared length (or magnitude) of the vector. This property is computationally faster than calculating the actual length using the Length
property, as it avoids the computational cost of a square root operation. It is particularly useful in scenarios where only a relative comparison of vector lengths is needed, such as when determining which of two vectors is longer.