Skip to content

Tag Archives: Ruby Float-class

Float#truncate() is a float class method which return a truncated value rounded to ndigits decimal digits precision. Syntax: float.truncate() Parameter: float value as argument Return:… Read More
Float#to_i() is a float class method which return a Integer representation of the float value. Syntax: float.to_i() Parameter: float value as argument Return: Integer representation… Read More
round() is a float class method which return a float value rounded to the nearest value with n digits decimal digits precision. Syntax: float.round() Parameter:… Read More
eql() is a float class method which checks whether two values are equal. Syntax: float.eql() Parameter: float values which is to be checked Return: Boolean… Read More
coerce() is a float class method which return the ceil value of the passed float value. Syntax: float.coerce() Parameter: numeric values (can be integer as… Read More
ceil() is a float class method which return the ceil value of the passed float value. Syntax: float.ceil() Parameter: float value which is to get… Read More
floor() is a float class method which return the floor value of the passed float value. Syntax: float.floor() Parameter: float value which is to get… Read More
Float#() : () is a Float class method in Ruby which compares two Float values. Syntax: Float.() Parameter: Float values Return: 0 if a equals… Read More
Float#==() : ==() is a Float class method in Ruby which checks the equality of two Float values. Syntax: Float.==() Parameter: Float values Return: true… Read More
Float#>=() : >=() is a Float class method in Ruby which compares two Float values. Syntax: Float.>=() Parameter: Float values Return: true - if a… Read More
Float#<=() : <=() is a Float class method in Ruby which compares two Float values. Syntax: Float.<=() Parameter: Float values Return: true - if a… Read More
Float#>() : >() is a Float class method in Ruby compares two Float values. Syntax: Float.>() Parameter: Float values Return: true - if a >… Read More
Float#<() : <() is a Float class method in Ruby which compares two Float values. Syntax: Float.<() Parameter: Float values Return: true - if a… Read More
Float#/() : /() is a Float class method in Ruby which return the division quotient value of the two Float values. Syntax: Float./() Parameter: Float… Read More
Float#-() : -() is a Float class method in Ruby which return difference of two Float numbers. Syntax: Float.-() Parameter: Float values Return: Difference of… Read More