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