lib/ruby_on_rays/point2.rb
def distance_squared_to(other)
      dx = @x - other.x
      dy = @y - other.y

      dx * dx + dy * dy
    end
# Returns the square of the distance between this point and another point.
# @param other [Point2]
# @return [Float] The distance squared.
Returns the square of the distance between this point and another point.
Returns the square of the distance between this point and another point .
def distance_squared_to(other)
      dx = @x - other.x
      dy = @y - other.y
      dx * dx + dy * dy
    end
def distance_squared_to ( other ) dx = @x - other . x dy = @y - other . y dx * dx + dy * dy end
Returns the square of the distance between this point and another point.
Returns the square of the distance between this point and another point .
The distance squared.
The distance squared .
Float
other
None