You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Referenced from the Ruby Ver. 2.4.1. Float data type API:
Constant Float::INFINITE stands for the number is infinite
Constant Float::NAN stands for "Not a Number"
Float#modulo Synonym to the % operator (Get the quotient from the divide operation) Float#quo Synonym to the / operator (Get the quotient from the divide operation)
Float#abs Return positive number of the float. "Formally as the distance between 0 to the number of the float in 1-dimensional axis ..."
Float#angle (and Float#arg) If positive -> return 0; else -> return PI
Float#ceil Returns smallest number greater than or equal to the receiver
Float#floor Returns largest number smaller than or equal to the receiver
Float#round Rounds float to a given precision in decimal digits (default 0 digits). Precision may be negative. Returns a floating point number when n digits is more than zero.
Float#finite? Returns true if receiver isn't equal to Float::INFINITE
Float#infinite? Returns true if receiver is equal to Float::INFINITE
Float#divmod Returns array which is in format of [ (Integer) Quotient, (Float) Remainder ]
Float#nan? Returns true if receiver is equal to Float::NAN
Float#positive? Returns true if float number is larger than 0.0
Float#negative? Returns true if float number is less than 0.0
Float#zero? Returns true if float number is equal to 0.0
Float#rationalize Convert to something called Rational data type (Currently not supported but from my point of view, it is worth being addressed in this issue)
The text was updated successfully, but these errors were encountered:
@saveriomiroddi @Maxwell-Alexius I have tested with some float numbers and seems like modulo and quo are really just alias methods. If so then we shouldn't support them.
Referenced from the Ruby Ver. 2.4.1. Float data type API:
Float::INFINITE
stands for the number is infiniteFloat::NAN
stands for "Not a Number"Float#modulo
Synonym to the%
operator (Get the quotient from the divide operation)Float#quo
Synonym to the/
operator (Get the quotient from the divide operation)Float#abs
Return positive number of the float. "Formally as the distance between 0 to the number of the float in 1-dimensional axis ..."Float#angle
(andFloat#arg
) If positive -> return 0; else -> return PIFloat#ceil
Returns smallest number greater than or equal to the receiverFloat#floor
Returns largest number smaller than or equal to the receiverFloat#round
Rounds float to a given precision in decimal digits (default 0 digits). Precision may be negative. Returns a floating point number whenn
digits is more than zero.Float#finite?
Returnstrue
if receiver isn't equal toFloat::INFINITE
Float#infinite?
Returnstrue
if receiver is equal toFloat::INFINITE
Float#divmod
Returns array which is in format of [ (Integer) Quotient, (Float) Remainder ]Float#nan?
Returnstrue
if receiver is equal toFloat::NAN
Float#positive?
Returnstrue
if float number is larger than0.0
Float#negative?
Returnstrue
if float number is less than0.0
Float#zero?
Returnstrue
if float number is equal to0.0
Float#rationalize
Convert to something calledRational
data type (Currently not supported but from my point of view, it is worth being addressed in this issue)The text was updated successfully, but these errors were encountered: