Version: 2020.1

Mathf.DeltaAngle

切换到手册
public static float DeltaAngle (float current, float target);

描述

计算两个给定角度(以度为单位给定)之间的最短差异。

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Prints 90 Debug.Log(Mathf.DeltaAngle(1080, 90)); } }