Module: Lazier::Math::ClassMethods
- Defined in:
- lib/lazier/math.rb
Overview
General methods.
Instance Method Summary (collapse)
-
- (Object) max(*args)
Returns the maximum value between the arguments.
-
- (Object) min(*args)
Returns the minimum value between the arguments.
Instance Method Details
- (Object) max(*args)
Returns the maximum value between the arguments.
25 26 27 |
# File 'lib/lazier/math.rb', line 25 def max(*args) args.ensure_array(default: [], no_duplicates: true, compact: true, flatten: true).max end |
- (Object) min(*args)
Returns the minimum value between the arguments.
17 18 19 |
# File 'lib/lazier/math.rb', line 17 def min(*args) args.ensure_array(default: [], no_duplicates: true, compact: true, flatten: true).min end |