Rad2Deg
Radians-to-degrees conversion constant (Read Only).
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Field
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public const float Rad2Deg = 57.29578
Remarks
This is equal to 360 / (PI * 2).
Additional Resources: Mathf.Deg2Rad constant.
Examples
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."); }}