Ruby | Math asin() function Last Updated : 04 Dec, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report The asin() is an inbuilt function in Ruby returns the arc sine of a number means give a sin value to this function it will return the angle in radian corresponding to that value. The value passed is in between -1 and +1. Syntax: Math.asin(value) Parameters: The function accepts one mandatory parameter value whose corresponding angle we have to find. Return Value: It returns the angle in radians which in range -pi/2 to +pi/2. Example 1: Ruby #Ruby program for asin() function #Assigning values val1 = 1 val2 = 0.5 val3 = -1 val4 = -0.9 #Prints the asin() value puts Math.asin(val1) puts Math.asin(val2) puts Math.asin(val3) puts Math.asin(val4) Output: 1.5707963267948966 0.5235987755982989 -1.5707963267948966 -1.1197695149986342 Example 2: Ruby #Ruby program for asin() function #Assigning values val1 = 0.87 val2 = 0.67 val3 = -0.679 val4 = -0.564 #Prints the asin() value puts Math.asin(val1) puts Math.asin(val2) puts Math.asin(val3) puts Math.asin(val4) Output: 1.0552023205488061 0.7342087874533589 -0.746399633896421 -0.59922176813665 Reference: https://devdocs.io/ruby~2.5/math#method-c-asin Comment More infoAdvertise with us Next Article Ruby | Math asin() function G gopaldave Follow Improve Article Tags : Ruby Ruby-Methods Ruby Collections Ruby Math-class Similar Reads Ruby | Math asinh() function The asinh() is an inbuilt function in Ruby returns the inverse hyperbolic sine of an angle given in radians. It accepts all values between range (-INFINITY, INFINITY). Syntax: Math.asinh(value)Â Parameters: The function accepts one mandatory parameter value which specifies the inverse hyperbolic ang 1 min read Ruby | Math atan() function The atan() is an inbuilt function in Ruby returns the arc tangent of a number means give a tangent value to this function it will return the angle in radian corresponding to that value. arc tangent is the inverse operation of tangent. This function accepts all numbers in range [-inf, +inf]. Syntax: 1 min read Ruby | Math acos() function The acos() is an inbuilt function in Ruby which returns the inverse cosine of a number (argument) in radians. The value which is returned by the acos() function always lies between âpi to +pi. Syntax: Math.acos(value) Parameters: This function accepts one mandatory parameter value which specifies th 1 min read Ruby | Math acosh() function The acosh() is an inbuilt function in Ruby returns the inverse hyperbolic cosine of an angle given in radians. Syntax: Math.acosh(value) Parameters: The function accepts one mandatory parameter value which specifies the inverse hyperbolic angle in radian which should be greater or equal to 1. If the 1 min read Ruby | Math atan2() function The atan2() is an inbuilt function in Ruby returns angent inverse of (y/x), where y is the proportion of the y-coordinate and x is the proportion of the x-coordinate. The numeric value lies between âpi and +pi representing the angle theta of a (x, y) point and positive x-axis. It is the counterclock 1 min read Like