Version: 2017.3

Mathf.DeltaAngle

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

描述

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

using UnityEngine;
using System.Collections;

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