數學常數 |
說明 |
M_E |
e=2.7182818284590452354 (自然指數) |
M_LOG2E |
log2e=1.4426950408889634074 (自然指數以 2 為底之對數) |
M_LOG10E |
log10e=0.43429448190325182765 (自然指數的常用對數) |
M_LN2 |
ln2=0.69314718055994530942 (2 的自然對數) |
M_LN10 |
ln10=2.30258509299404568402 (10 的自然對數) |
M_PI |
PI=3.14159265358979323846 (圓周率) |
M_PI_2 |
PI/2=1.57079632679489661923 (二分之一的圓周率) |
M_PI_4 |
PI/4=0.78539816339744830962 (四分之一的圓周率) |
M_1_PI |
1/PI=0.31830988618379067154 (圓周率的倒數) |
M_2_PI |
2/PI=0.63661977236758134308 (兩倍的圓周率倒數) |
M_2_SQRTPI |
2/sqrt(PI)=1.12837916709551257390 (2 除以圓周率開平方) |
M_SQRT2 |
sqrt(2)=1.41421356237309504880 (2 開平方) |
M_SQRT1_2 |
1/sqrt(2)=0.70710678118654752440 (2 開平方的倒數) |
DEG_TO_RAD |
角度*PI/180=0.0174532925199432958 (角度轉弧度常數) |
RAD_TO_DEG |
弧度*180/PI=57.2957795130823208768 (弧度轉角度常數) |
NAN |
非數字=nan |
INFINITY |
無限大=inf |