class Triangle
Attributes
points[RW]
Public Class Methods
new(p0 = Point::ORIGIN, p1 = Point::ORIGIN, p2 = Point::ORIGIN)
click to toggle source
# File examples/ruboids/ruboids/Triangle.rb, line 13 def initialize(p0 = Point::ORIGIN, p1 = Point::ORIGIN, p2 = Point::ORIGIN) @points = [] @points << p0 ? p0 : Point::ORIGIN.dup() @points << p1 ? p1 : Point::ORIGIN.dup() @points << p2 ? p2 : Point::ORIGIN.dup() end