float LengthSquared { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

Squared length of the vector. This is faster than Length, and can be used for things like comparing distances, as long as only squared values are used.

Usage

To use the LengthSquared property, simply access it from an instance of the Vector3 struct. For example:

Vector3 vector = new Vector3(1, 2, 3);
float squaredLength = vector.LengthSquared;

Example

<code>Vector3 vector = new Vector3(1, 2, 3);
float squaredLength = vector.LengthSquared;</code>