从他们的文件(
原文链接:https://www.f2er.com/php/136184.htmldeg2rad
,radians
)来看,他们似乎也这样做.
并快速验证一个简单的测试用例:
MysqL> select radians(0),radians(45),radians(90); +------------+-------------------+-----------------+ | radians(0) | radians(45) | radians(90) | +------------+-------------------+-----------------+ | 0 | 0.785398163397448 | 1.5707963267949 | +------------+-------------------+-----------------+ 1 row in set (0,00 sec)
而且,在PHP中:
var_dump(deg2rad(0),deg2rad(45),deg2rad(90));
还给出:
float 0 float 0.785398163397 float 1.57079632679
所以,它们似乎完全一样……