Class: Numeric
Overview
dump
Instance Method Summary collapse
- #dump ⇒ Object
-
#nonzero ⇒ Object
If self is negative, returns 0.
-
#sign ⇒ Object
1 : self >=0 / -1 : self < 0.
Instance Method Details
#dump ⇒ Object
941 |
# File 'lib/el4r/el4r-sub.rb', line 941 def dump() self end |
#nonzero ⇒ Object
If self is negative, returns 0
91 92 93 |
# File 'lib/el4r/el4r-sub.rb', line 91 def nonzero [self, 0].max end |
#sign ⇒ Object
1 : self >=0 / -1 : self < 0
86 87 88 |
# File 'lib/el4r/el4r-sub.rb', line 86 def sign if self >= 0 then 1 else -1 end end |