Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Angle

Represents an angle value.
Read time 1 minuteLast updated 6 days ago

Definition

public struct Angle : IEquatable<Angle>

Constructors

Constructor

Description

Angle(System.Single)Creates an Angle from a float and an optionnal AngleUnit.
Angle(System.Single,UnityEngine.UIElements.AngleUnit)Creates an Angle from a float and an optionnal AngleUnit.

Properties

Property

Description

unitThe unit of the value property.
valueThe angle value.

Methods

Method

Description

ToDegreesReturns the value of the angle, expressed in degrees.
ToGradiansReturns the value of the angle, expressed in gradians.
ToRadiansReturns the value of the angle, expressed in radians.
ToTurnsReturns the value of the angle, expressed in turns.

Static Methods

Method

Description

DegreesCreates an Angle from degrees.
GradiansCreates an Angle from gradians
RadiansCreates an Angle from radians
TurnsCreates an Angle from turns