Version: 2020.1
public static float Rad2Deg ;

描述

弧度到度换算常量(只读)。

这等于“360 / (PI * 2)”。

另请参阅:Deg2Rad 常量。

using UnityEngine;

public class MathfRad2Deg : MonoBehaviour { // convert 1 radian to degrees

float rad = 1.0f;

void Start() { float deg = rad * Mathf.Rad2Deg; //This will output 1 radians are equal to 57.29578 degrees Debug.Log(rad + " radians are equal to " + deg + " degrees."); } }