Ruby | Math cos() function
The cos() is an inbuilt function in Ruby returns the cosine value of a given angle expressed in radians which is in range [-inf, +inf]. The returned value is in range [-1, +1]. Syntax: Math.cos(value) Parameters: The function accepts one mandatory parameter value whose corresponding cosine value is