# File utilities/Geometry.rb, line 51
  def intersectRay? ray
    o = ray.origin
    t = ray.other
    m = Matrix[[t[0] - o[0], @p2[0] - @p1[0]],
      [t[1] - o[1], @p2[1] - @p1[1]]]
    v = Matrix.column_vector([@p2[0] - o[0], @p2[1] - o[1]])
   
    x = LSolve.Invert(m, v)

    if x == nil
      true
    elsif (x[0,0] >= 0 && x[1,0] >= 0 && x[1,0] <= 1)
      true
    else
      false
    end
  end