Class: SimplePolygons::Triangle

Inherits:
Polygon
  • Object
show all
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

Methods inherited from Polygon

#number_of_points

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

Returns:

  • (Boolean)


71
72
73
# File 'lib/simple-polygons.rb', line 71

def self.valid_points?(array)
	return true
end