Ruby: Numeric
2017-04-27 本文已影响15人
bookinstock_
integer
- 200.abs is the absolute value.
- 200.next return the next integer.
- leading sign: 0 for octal, 0x for hex, ob for binary
- underscore: underscore chars are ignored in digit
float
- 123.45.round follow the round rule
- 123.45.ceil means rounding up
- 123.54.floor means rounding down
- 123.54.to_i same as rounding down