The ATan function returns the arc tangent (also known as the inverse tangent) of a numeric value. It computes the angle whose tangent is equal to the specified number. This function is widely used in geometry, navigation, robotics, motion control, and general signal processing—any situation where an angle must be reconstructed from a ratio of two lengths or measurement values.
As with all trigonometric operations on the Cubloc platform, the result is expressed in radians. For maximum precision, especially when performing chained trigonometric calculations or working with small fractional values, it is recommended to store the input in a Single.
The tangent function maps angles to an infinite range, so ATan accepts any real number as its input. The returned angle will fall within the standard mathematical range of –π/2 to +π/2 radians.
Example
A = ATan B ' Returns the angle (in radians) whose tangent equals B.