编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
  • « ceil
  • cosh »
  • PHP Manual
  • Math 函数
  • 余弦

cos

(PHP 4, PHP 5, PHP 7)

cos — 余弦

说明

cos ( float $arg ) : float

cos() 返回参数 arg 的余弦值。参数 arg 的单位为弧度。

参数

arg

以弧度表示的角度

返回值

arg的余弦值

范例

Example #1 cos() 例子

<?php

echo cos(M_PI); // -1

?>

参见

  • acos() - 反余弦
  • sin() - 正弦
  • tan() - 正切
  • deg2rad() - 将角度转换为弧度

相关文章
php math 函数 绝对值php math 函数 反余弦php math 函数 反双曲余弦php math 函数 反正弦php math 函数 二进制转换为十进制php math 函数 进一法取整php math 函数 余弦php math 函数 双曲余弦php math 函数 将角度转换为弧度php math 函数 返回 exp number 1,甚至当 number 的值接近零也能计算出准确结果php math 函数 显示随机数的最大可能值php math 函数 生成更好的随机数php math 函数 播下一个更好的随机数发生器种子php math 函数 八进制转换为十进制php math 函数 将弧度数转换为相应的角度数php math 函数 平方根php math 函数 播下随机数发生器种子php math 函数 正切php math 函数 双曲正切php bc math bc 数学 函数
关注编程学问公众号
编程学问网 湘ICP备20001732号