Method: Joules.trapezium_area
- Defined in:
- lib/joules/geometry.rb
.trapezium_area(top_base, bottom_base, height) ⇒ Float
Calculates the area of a trapezium given top base, bottom base, and height.
72 73 74 |
# File 'lib/joules/geometry.rb', line 72 def trapezium_area(top_base, bottom_base, height) return 0.5 * (top_base + bottom_base) * height end |