current | The current angle in degrees. |
target | The target angle in degrees. |
float A value between -179 and 180, in degrees.
Calculates the shortest difference between two angles.
using UnityEngine;
public class Example : MonoBehaviour { void Start() { // Prints 90 Debug.Log(Mathf.DeltaAngle(1080, 90)); } }