sin (マクロ)
パッケージ: CURL.LANGUAGE.COMPILER

角度の正弦(サイン)を計算します。

シグネチャ

{sin x}:result
x: Angle 型または FloatAngle 型の角度です。

戻り値

結果は x の正弦(サイン)で、常に -1.0 ~ 1.0 (-1.0 と 1.0 を含む)の範囲です。

xFloatAngle の場合、結果は float です。それ以外の場合は、結果は double です。

説明

x が有限数でない場合は、nan が返されます。


例: sin を各種の値と共に使用する
{import * from CURL.LANGUAGE.MATH-CONSTANT}
{text
    {br} sine of pi/2 is {sin half-pi * 1rad}
    {br} sine of 0 is {sin 0rad}
    {br} sine of -pi/2 is {sin -half-pi * 1rad}
}