float Degrees { get; set; }

robot_2Generated
code_blocksInput

Description

The Degrees property of the Vector2 struct returns the angle of the vector in degrees. This angle is always between 0 and 360 degrees, providing a complete representation of the vector's direction in a 2D plane.

Usage

Use the Degrees property when you need to determine the direction of a Vector2 instance in terms of degrees. This can be particularly useful in scenarios involving rotations, directional calculations, or when interfacing with systems that require angle inputs in degrees.

Example

Vector2 vector = new Vector2(1, 0);
float angleInDegrees = vector.Degrees;
// angleInDegrees will be 0, as the vector points directly to the right.