Module: Validation::Triangle
- Defined in:
- lib/math_plus/validation/triangle.rb
Class Method Summary collapse
Class Method Details
.three_way_check(a, b, c) ⇒ Object
3 4 5 6 7 |
# File 'lib/math_plus/validation/triangle.rb', line 3 def self.three_way_check(a, b, c) if a + b <= c || a + c <= b || b + c <= a raise "The triangle doesn't exist" end end |