Class: Geometry::Triangle Abstract

Inherits:
Object
  • Object
show all
Includes:
ClusterFactory
Defined in:
lib/aurora-geometry/triangle.rb

Overview

This class is abstract.

Factory class that instantiates the appropriate subclasses

Class Method Summary collapse

Methods included from ClusterFactory

included

Class Method Details

.new(point0, point1, point2) ⇒ Object .new(point, length) ⇒ Object

Overloads:



31
32
33
34
35
36
37
# File 'lib/aurora-geometry/triangle.rb', line 31

def self.new(*args)
     if args.size == 3
	ScaleneTriangle.new *args
     elsif args.size == 2
	RightTriangle.new args[0], args[1], args[1]
     end
end