This is an old revision of the document!
====== Tan ======Returns the tangent of a number. The Cubloc uses radians as units for its trigonometric functions. To ensure maximum precision, it is highly recommended to use the Single data type for both input and output variables.Note: If your input is in degrees, you must convert it to radians using the formula: $rad = deg \times (\frac{\pi}{180})$.
Dim A As SingleDim B As SingleB = 0.785398 ' 45 degrees in radians (PI / 4)A = Tan(B) ' Returns the tangent of B (approx. 1.0)
====== Tanh ======Returns the hyperbolic tangent of a number. The Cubloc uses radians as units. The resulting value of Tanh will always range between -1.0 and 1.0. Use the Single data type to achieve the most precise results.
Dim A As SingleDim B As SingleB = 1.0A = Tanh(B) ' Returns the hyperbolic tangent of B