ACS()
Jump to navigation
Jump to search
Description
- This function returns the arc cosine of the given number or expression.
- The result is expressed in radians.
- The opposite is the COS() function.
Syntax
- ACS(Number)
Hints
- arc cosine of (-1) happens to be Pi (3.14159....). Hence useful functions.
- ACS(Number) defined only for -1<=Number<=1 (otherwise, you'll get "out of range" error).
- Most mathematical operations in Just BASIC can be performed on Literal Numbers, Numeric Variables, or Numeric Expressions that consist of Literal Numbers, Numeric Variables, or both.
- There are 2 * pi radians in a full circle of 360 degrees. A formula to convert degrees to radians is: radians = degrees divided by 57.29577951.
Example
Print ACS(1) Print ACS(0.5) Print ACS(-0.2) Print ACS(-1/2) End
Useful Procedures
Calculating PI
function Pi()
Pi= acs(-1)
end function
Converting Degrees to Radians
function deg2rad(angle) 'degrees to radians
deg2rad = angle*acs(-1)/180 'angle*Pi/180
end function
Converting Radians to Degrees
function rad2deg(angle) 'radians to degrees
rad2deg = angle*180/acs(-1) 'angle*180/Pi
end function