- Timestamp:
- Jul 9, 2020, 8:51:43 AM (4 years ago)
- Location:
- EcnlProtoTool/trunk/mruby-2.1.1
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb
r331 r439 1 module Integral 2 def div(other) 3 self.divmod(other)[0] 4 end 5 1 class Numeric 6 2 def zero? 7 3 self == 0 … … 15 11 end 16 12 end 13 14 def positive? 15 self > 0 16 end 17 18 def negative? 19 self < 0 20 end 17 21 end
Note:
See TracChangeset
for help on using the changeset viewer.