Class: SimplePolygons::Triangle
- Defined in:
- lib/simple-polygons.rb
Overview
NOT YET IMPLEMENTED. Represents a triangle. It can be any of the 3 kinds.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(location_array) ⇒ Triangle
constructor
location_array should be an array of location objects.
Methods inherited from Polygon
Constructor Details
#initialize(location_array) ⇒ Triangle
location_array should be an array of location objects. If they don’t form a triangle, an InvalidLocationArrayError will be raised.
67 68 69 |
# File 'lib/simple-polygons.rb', line 67 def initialize(location_array) raise InvalidLocationArrayError.new() unless valid_points?(location_array) end |
Class Method Details
.valid_points?(array) ⇒ Boolean
71 72 73 |
# File 'lib/simple-polygons.rb', line 71 def self.valid_points?(array) return true end |