float Degrees { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Degrees property of the Vector2Int struct returns the angle of the vector in degrees. This angle is always between 0 and 360 degrees, providing a full circle representation of the vector's direction.

Usage

Use the Degrees property to determine the direction of a Vector2Int in a 2D space. This can be particularly useful for operations involving rotations, directional calculations, or when you need to convert a vector's direction into a human-readable angle.

Example

Vector2Int vector = new Vector2Int(1, 1);
float angleInDegrees = vector.Degrees;
// angleInDegrees will be 45.0f, as the vector (1,1) points diagonally in a 2D space.