Class: Math::Geometry::Rectangle
- Inherits:
-
Quadrilateral
- Object
- Shape
- PlaneFigure
- Quadrilateral
- Math::Geometry::Rectangle
- Defined in:
- lib/ruuuby/math/geometry/shape/quadrilateral.rb
Overview
▬
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from PlaneFigure
Instance Method Summary collapse
-
#initialize(length, height) ⇒ Rectangle
constructor
A new instance of Rectangle.
- #interior_angles ⇒ Array<ThetaAngle>
Methods inherited from Quadrilateral
Methods inherited from PlaneFigure
Constructor Details
#initialize(length, height) ⇒ Rectangle
Returns a new instance of Rectangle.
28 29 30 31 32 |
# File 'lib/ruuuby/math/geometry/shape/quadrilateral.rb', line 28 def initialize(length, height) @length = length @height = height super() end |
Instance Method Details
#interior_angles ⇒ Array<ThetaAngle>
35 36 37 38 39 40 41 |
# File 'lib/ruuuby/math/geometry/shape/quadrilateral.rb', line 35 def interior_angles if @angles.nil? corner_angle = θ°(90) @angles = [corner_angle, corner_angle, corner_angle, corner_angle] end @angles end |