I have an equation to be calculated in vb that requires me to calculate the acos of a value. There doesn't seem to appear to be an acos function in vb. I heard you can do some trick with atan. Does anyone know that trick or have any suggestions?
1. If your VBA code is for an excel application, use
application.acos(angle)
With the "application" in front, VBA will reckognize the excel functions.
2. If not, derive function via atn() as described in the VBAhelp (browse for help on cos, and press "see also":
Derived Math Functions
The following is a list of nonintrinsic math functions that can be derived from the intrinsic math functions:
Function Derived equivalents
......
Inverse Cosine Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
......