float Length { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Length property of the Vector3Int struct represents the magnitude or length of the vector. It calculates the distance from the origin (0,0,0) to the point defined by the vector's components (x, y, z). This property returns a float value representing the Euclidean distance.

Usage

Use the Length property when you need to determine the magnitude of a Vector3Int instance. This can be useful in scenarios where you need to compare vector sizes or determine the distance from the origin.

Example

Vector3Int vector = new Vector3Int(3, 4, 5);
float length = vector.Length;
// length will be approximately 7.071