Returns the tangent of a specified angle.
...Math.Tan(angle )
Prerequisites
None
Parameters
angle
A required expression that evaluates to an angle in units of radians. This angle is not limited to values between -π and +π and can be arbitrarily large.
Remarks
Returns the tangent of the angle that is specified in radians. Since the returned value will be extremely large as the angle approaches π/2 or -π/2, it is normally desirable to use the Math.Sin and Math.Cos methods in place of this operation.
To convert degrees to radians, multiply the degrees times π/180.
Examples
Dim tan_val As Single
tan_val = Math.Tan(0) ' Sets tan_val to 0
tan_val = Math.Tan(Math.PI/4) ' Sets tan_val to 1
tan_val = Math.Tan(-45*Math.PI/180)' Sets tan_val to -1
See Also