Mathf
- Abs
- Acos
- Approximately
- Asin
- Atan2
- Atan
- CeilToInt
- Ceil
- Clamp01
- Clamp
- ClosestPowerOfTwo
- Cos
- Deg2Rad
- DeltaAngle
- Epsilon
- Exp
- FloorToInt
- Floor
- Infinity
- InverseLerp
- IsPowerOfTwo
- LerpAngle
- Lerp
- Log10
- Log
- Max
- Min
- MoveTowardsAngle
- MoveTowards
- NegativeInfinity
- NextPowerOfTwo
- PingPong
- PI
- Pow
- Rad2Deg
- Repeat
- RoundToInt
- Round
- Sign
- Sin
- SmoothDampAngle
- SmoothDamp
- SmoothStep
- Sqrt
- Tan
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.");
}
最后修改:2011年2月21日 Monday 11:38