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?

Tan

角度のタンジェントを返します。

Synopsis

Tan(number)

引数

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

概要

Tan 関数は角度を取得し、直角三角形の 2 辺の比を返します。その比は、指定した角の対辺の長さを、その角に隣接する辺の長さで除算した値です。

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

以下の例は、Tan 関数を使用して、角度のタンジェントを返します。

Dim MyAngle
MyAngle = 1.3           ' Define angle in radians.
Println Tan(MyAngle)    ' Calculate tangent.

以下の例は、Tan 関数を使用して、角度のコタンジェントを返します。

Dim MyAngle, MyCotangent
MyAngle = 1.3                   ' Define angle in radians.
MyCotangent = 1 / Tan(MyAngle)  ' Calculate cotangent.
Println MyCotangent

関連項目

FeedbackOpens in a new tab