目录

cos

此方法返回指定值的余弦值。

语法 (Syntax)

cos(X)

参数 (Parameters)

X - 为余弦函数指定一个值。

返回值 (Return Value)

返回值是表示余弦值的浮点值。

例如 (For example)

-module(helloworld). 
-import(math,[cos/1]). 
-export([start/0]). 
start() -> 
   Cosin = cos(45), 
   io:fwrite("~p~n",[Cosin]).

输出 (Output)

当我们运行上述程序时,我们将得到以下结果。

0.5253219888177297
↑回到顶部↑
WIKI教程 @2018