Mathf.Rad2Deg 弧度转度

static var Rad2Deg : float

Description描述

Radians-to-degrees conversion constant (Read Only).

弧度到度的转化常量。(只读)

This is equal to 360 / (PI * 2).

这等于 360 / (PI * 2)。

参考:Deg2Rad 常数

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public float rad = 10.0F;
	void Start() {
		float deg = rad * Mathf.Rad2Deg;
		Debug.Log(rad + " radians are equal to " + deg + " degrees.");
	}
}
// convert 1 radian to degrees
//转换1弧度到度

var rad : float = 10.0;

function Start() {
	var deg : float = rad * Mathf.Rad2Deg;
	Debug.Log(rad + " radians are equal to " + deg + " degrees.");
}
Page last updated: 2011-2-21