lib/ruby_on_rays/point2.rb
# Returns the distance between this point and another point.
# @param other [Point2]
# @return [Float] The distance.
Returns the distance between this point and another point.
Returns the distance between this point and another point .
def distance_to(other)
      dx = @x - other.x
      dy = @y - other.y
      Math.sqrt(dx * dx + dy * dy)
    end
def distance_to ( other ) dx = @x - other . x dy = @y - other . y Math . sqrt ( dx * dx + dy * dy ) end
Returns the distance between this point and another point.
Returns the distance between this point and another point .
None
Float
other
<not_specific>
<not_specific>
None