ASin
The ASin function returns the arc sine (also called the inverse sine) of a numeric value. It calculates the angle whose sine is equal to the specified number. This operation is fundamental in trigonometry and is frequently used in applications such as geometric computations, sensor data processing, inverse kinematics, and signal analysis where angles must be derived from ratios or normalized values.
All trigonometric functions on the Cubloc platform use radians as their angular unit. For highest numerical precision—especially when dealing with small values, floating-point calculations, or cumulative angle computations—it is recommended to store and process the input as a Single.
ASin requires its input value to be within the mathematical domain of –1.0 to +1.0. Values outside this range do not correspond to any real angle and will produce an invalid result.
Example
A = ASin B ' Returns the angle (in radians) whose sine equals B.
Explanation:
- B should contain a sine value, often the result of a previous computation such as a scaled sensor reading or vector normalization.
- ASin B computes the corresponding angle in radians.
- The computed angle is stored in A and may be used in further calculations, or converted to degrees if needed.
