Función Tan

Calcula la tanxente d'un ángulu. L'ángulu devolver en radianes.

Using the angle Alpha, the Tan function calculates the ratio of the length of the side opposite the angle to the length of the side adjacent to the angle in a right-angled triangle.

Tan(Alpha) = side opposite the angle/side adjacent to angle

Syntax:


Tan (Number As Double) As Double

Return value:

Double

Parameters:

Númberu: Cualquier espresión numbérica de la que se deseye calcular la tanxente (en radianes).

To convert degrees to radians, multiply by Pi/180. To convert radians to degrees, multiply by 180/Pi.

degrees=(radians*180)/Pi

radians=(degrees*Pi)/180

Pi val 3,141593 aprosimao.

Error codes:

5 Llamada a procedimientu non válida

Example:


' Nesti exemplu, la entrada siguiente ye posible pa un triángulu rectángulu:
' El llau opuestu al ángulu y l'ángulu (en graos) pa calcular el llargor del llau axacente al ángulu:
Sub ExampleTangens
' Pi = 3,1415926 ye una variable predefinida
Dim d1 As Double
Dim dAlpha As Double
    d1 = InputBox("Introduza'l llargor del llau opuestu al ángulu: ","opuestu")
    dAngle = InputBox("Escriba l'ángulu Alfa (en graos): ","Alfa")
    Print "el llargor del llau axacente al ángulu ye"; (d1 / tan (dAlpha * Pi / 180))
End Sub

Please support us!