From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Global Method

Tan(value As Double) As Double

Supported for all project types and targets.

Returns the tangent of the angle specified.


result=Tan (value)

Part Type Description
result Double The tangent of value.
value Double The value (in radians) you want the tangent of.


The Tan function returns the tangent of the angle (in radians) passed to it. If the angle is in degrees, multiply it by PI/180 to convert it to radians.


This example uses the Tan function to return the tangent of a number.

Var d As Double
Const kPi = 3.14159265
d = Tan(45 * kPi / 180) // returns 1.0

See Also

Atan function.