Method: Coords::Shapes::Line2d#initialize

Defined in:
lib/coords/shapes/line2d.rb

#initialize(x1, y1, x2, y2) ⇒ Line2d

Returns a new instance of Line2d.



5
6
7
8
# File 'lib/coords/shapes/line2d.rb', line 5

def initialize(x1, y1, x2, y2)
  @point1 = Coords::Cartesian2d.new(x1, y1)
  @point2 = Coords::Cartesian2d.new(x2, y2)
end