Public Const cstPi As Double = 3.14159265389793
Public Const cstE As Double = 2.71828182845905
'Degrees -> radians
Public Function DegToRad(ByVal dblDeg)
DegToRad = cstPi * dblDeg / 180
End Function
'Radiant -> degree
Public Function RadToDeg(ByVal dblRad)
RadToDeg = 180 * dblRad / cstPi
End Function
'Arc sine
Public Function Acs(ByVal dblX As Double)
If dblX = 0 Then
Acs = cstPi / 2
Else
Acs = Atn(Sqr(1 - dblX * dblX) / dblX)
End If
End Function
' ArcusCotangens
Public Function Act(ByVal dblX As Double)
If dblX = 0 Then
Act = cstPi / 2
Else
Act = Atn(1 / dblX)
End If
End Function
' Area Cosinus Hyperbolicus
Public Function ArCosh(ByVal dblX As Double)
ArCosh = Log(dblX + Sqr(dblX * dblX - 1))
End Function
' Area Cotangens Hyperbolicus
Public Function ArCoth(ByVal dblX As Double)
ArCoth = 0.5 * Log((1 - dblX) / (1 + dblX))
End Function
' Area Sinus Hyperbolicus
Public Function ArSinh(ByVal dblX As Double)
ArSinh = Log(dblX + Sqr(dblX * dblX + 1))
End Function
' Area Tangens Hyperbolicus
Public Function ArTanh(ByVal dblX As Double)
ArTanh = 0.5 * Log((1 + dblX) / (1 - dblX))
End Function
' Arcus Sinus
Public Function Asn(ByVal dblX As Double)
If Abs(dblX) = 1 Then
Asn = Sgn(dblX) * cstPi / 2
Else
Asn = Atn(dblX / Sqr(1 - dblX * dblX))
End If
End Function
' Cosinus: Cos()
' CosinusHyperbolicus
Public Function Cosh(ByVal dblX As Double)
Cosh = (cstE ^ dblX + cstE ^ -dblX) / 2
End Function
' Cotangens
Public Function Cot(ByVal dblRad As Double)
Cot = 1 / Tan(dblRad)
End Function
' CotangensHyperbolicus
Public Function Coth(ByVal dblX As Double)
Coth = Cosh(dblX) / Sinh(dblX)
End Function
' Sinus: Sin()
' SinusHyperbolicus
Public Function Sinh(ByVal dblX As Double)
Sinh = (cstE ^ dblX - cstE ^ -dblX) / 2
End Function
' Tangens: Tan()
' TangensHyperbolicus
Public Function Tanh(ByVal dblX As Double)
Tanh = Sinh(dblX) / Cosh(dblX)
End Function