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 the exact length is not necessary, such as when comparing distances.