Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

Sin

角度のサインを返します。

Synopsis

Sin(number)

引数

引数 number は、角度をラジアンで表す任意の有効な数値式です。

概要

Sin 関数は角度を取得し、直角三角形の 2 辺の比を返します。その比は、指定した角に向かい合った辺の長さを斜辺の長さで除算した値です。結果は、-1 から 1 の範囲の値になります。

角度をラジアンに変換するには、角度の値に pi/180 を乗算します。ラジアンを角度に変換するには、180/pi を乗算します。

以下の例は、Sin 関数を使用して、角度のサインを返します。

Dim MyAngle
MyAngle = 1.3          ' Define angle in radians.
Println Sin(MyAngle)

以下の例は、Sin 関数を使用して、角度のコセカントを返します。

Dim MyAngle, MyCosecant
MyAngle = 1.3                   ' Define angle in radians.
MyCosecant = 1 / Sin(MyAngle)   ' Calculate cosecant.
Println MyCosecant

関連項目

FeedbackOpens in a new tab