diff --git a/guide/english/ruby/ruby-numbers-methods/index.md b/guide/english/ruby/ruby-numbers-methods/index.md index 5eaf395954..6a4b58be6b 100644 --- a/guide/english/ruby/ruby-numbers-methods/index.md +++ b/guide/english/ruby/ruby-numbers-methods/index.md @@ -60,6 +60,23 @@ Using `.to_s` on a number (To Float: + +Converts an Integer to a Float. + +```Ruby + 15.to_f #=> 15.0 +``` + +## Absolute value: + +Returns the absolute value of the integer. + +```Ruby + -12345.abs #=> 12345 + 12345.abs #=> 12345 +``` + ## Greatest Common Denominator: The `.gcd` method provides the greatest common divisor (always positive) of two numbers. Returns an **integer**.