привет, я написал этот класс точек в ruby, но мне нужен класс методов сравнения, с кем-нибудь, есть идеи, с чего начать?
class Point
attr_reader :x, :y
def initialize x,y
@x = x
@y = y
end
def addpoint(x,y) # used to add points
Point.new(@x+x, @y+y)
end
def to_s
x.to_s+" , "+y.to_s # used to change from object to strings
end
end