Mathf.DeltaAngle

Switch to Manual
public static float DeltaAngle(float current, float target);

Description

Calculates the shortest difference between two given angles given in degrees.

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Prints 90 Debug.Log(Mathf.DeltaAngle(1080, 90)); } }
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答