Version: 2023.1
언어: 한국어
public static float DeltaAngle (float current, float target);

파라미터

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)); } }