hola vereis tegno una duda tonta pero espero que podais ayudarme...
existe algun comando para hacer el arcoseno de un numero directamente tal como existe sin(), cos()...
o hace falta hacer alguna funcion o algo...
Gracias espero que podais ayudarme...
Si te refeires a un simil de la funcion Atan2() de C++:
Option Explicit
Const PI As Single = 3.14159265358979
Public Function Atan2(ByVal y As Double, ByVal x As Double) As Double
Dim theta As Double
If (Abs(x) < 0.0000001) Then
If (Abs(y) < 0.0000001) Then
theta = 0#
ElseIf (y > 0#) Then
theta = 1.5707963267949
Else
theta = -1.5707963267949
End If
Else
theta = Atn(y / x)
If (x < 0) Then
If (y >= 0#) Then
theta = 3.14159265358979 + theta
Else
theta = theta - 3.14159265358979
End If
End If
End If
Atan2 = theta
End Function
Public Function GetAngle(X1 As Long, Y1 As Long, X2 As Long, Y2 As Long) As Single
On Error Resume Next
GetAngle = CSng(Atan2(CDbl(Y2) - CDbl(Y1), CDbl(X2) - CDbl(X1)) * 180 / PI)
End Function
Yo con los terminos matematicos me hago lios a veces. Este codigo lo uso para calcular "arco-tangentes" (exactamente para calcular el angulo entre dos puntos) y no se si sera lo mismo que "arco-coseno" (nooo)
Salu2...