class Straightedge::Figures::Line
Public Instance Methods
alpha()
click to toggle source
# File lib/straightedge/figures/line.rb, line 4 def alpha @marks[0] end
beta()
click to toggle source
# File lib/straightedge/figures/line.rb, line 8 def beta @marks[1] end
dx()
click to toggle source
# File lib/straightedge/figures/line.rb, line 12 def dx alpha.x - beta.x end
dy()
click to toggle source
# File lib/straightedge/figures/line.rb, line 16 def dy alpha.y - beta.y end
length()
click to toggle source
# File lib/straightedge/figures/line.rb, line 20 def length Math.sqrt(dx*dx + dy*dy) end