sin

Function sin 

Source
pub fn sin(args: &[Value]) -> Result<Value, RuntimeError>
Expand description

正弦函数

§功能

计算角度的正弦值(输入为弧度)。

§参数

  • x: Number - 角度(弧度)

§返回值

Number - 正弦值,范围 [-1, 1]

§公式

sin(x): 直角三角形中,对边与斜边的比值

§示例

Set pi PI()
Set a Sin(0)            # 0.0
Set b Sin(pi / 2)       # 1.0
Set c Sin(pi)           # 0.0 (约等于)