文档

Unity Engine

Unity Engine

Angle

Represents an angle value.
阅读时间1 分钟最后更新于 1 个月前

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