modulo(numeric): Synonym for Float#%. : Number class « Number « Ruby





modulo(numeric): Synonym for Float#%.


6543.21.modulo(137)  
6543.21.modulo(137.24)

 

Related examples in the same category

1.Numbers are classes
2.Number Introduction
3.Ruby has a number of classes and modules related to numbers.
4.Math class and module hierarchy
5.floor Returns the largest integer less than or equal.
6.infinite? Returns nil,1,or +1 depending on whether flt is finite.