> Erlang中文手册 > sin/1 求正弦值

math:sin/1

求正弦值

用法:

sin(X)

返回一个数字的正弦值

Sin = math:sin(45),
io:format("Sin is ~p~n", [Sin]).
Pi = math:pi(),
Sin = math:sin(Pi / 2),
io:format("Sin is ~p~n", [Sin]).