本页内容
上一节: Func_math_asinh 下一节: Func_math_atan2

PHP atan() 函数

Category:PHP Math 数学函数参考手册

通过 atan() 函数返回不同数的反正切:


示例

<?php

echo(atan(0.50) . "<br>");

echo(atan(-0.50) . "<br>");

echo(atan(5) . "<br>");

echo(atan(-5) . "<br>");

echo(atan(100) . "<br>");

echo(atan(-100));

    ?>

定义和用法

atan() 函数返回 arg 的反正切,返回值为介于 -Pi/2 与 Pi/2 之间的数值。

语法

atan(arg);
参数 描述
arg 必需。规定要处理的参数。

技术细节

返回值: arg 的反正切,单位是弧度。
返回类型: Float
PHP 版本: 4+

Category:PHP Math 数学函数参考手册

上一节: Func_math_asinh 下一节: Func_math_atan2
此页面最后编辑于2022年8月17日 (星期三) 22:19。