QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _ASIN function returns the angle measured in radians based on an input SINe value ranging from -1 to 1.

Syntax

radian_angle! = _ASIN(sine_value!)

Description

Availability

Example(s)

Converting a radian angle to its SINe and using that value to find the angle in degrees again using _ASIN:


DEFDBL A-Z

INPUT "Give me an Angle (in Degrees) => "; Angle
PRINT
C = SIN(_D2R(Angle)) '_D2R is the command to convert Degrees to Radians, which is what SIN expects
PRINT "The SINE of the Angle is: "; C
A = _ASIN(C)
PRINT "The ASIN of "; C; " is: "; A
PRINT "Notice, A is the Angle in Radians.  If we convert it to degrees, the value is "; _R2D(A) 


Give me an Angle (in Degrees) => ? 60

The SINE of the Angle is:  .8660254037844386
The ACOS of   .8660254037844386  is:   1.047197551196598
Notice, A is the Angle in Radians.  If we convert it to degrees, we discover the value is  60

See Also