module Draught::Pointlike

Public Instance Methods

==(other) click to toggle source
# File lib/draught/pointlike.rb, line 15
def ==(other)
  raise NotImplementedError, "including classes must implement equality checking. It's assumed other point_types are always unequal"
end
approximates?(other, delta) click to toggle source
# File lib/draught/pointlike.rb, line 19
def approximates?(other, delta)
  raise NotImplementedError, "including classes must implement approximate equality checking. It's assumed other point_types are always unequal"
end
point_type() click to toggle source
# File lib/draught/pointlike.rb, line 11
def point_type
  raise NotImplementedError, "including classes must return a Symbol with their point type"
end
points() click to toggle source
# File lib/draught/pointlike.rb, line 31
def points
  [self]
end
transform(transformer) click to toggle source
# File lib/draught/pointlike.rb, line 27
def transform(transformer)
  raise NotImplementedError, "including classes must return a new instance transformed by the Affine transform or lambda Point-based transform supplied"
end
translate(vector) click to toggle source
# File lib/draught/pointlike.rb, line 23
def translate(vector)
  raise NotImplementedError, "including classes must return a new instance translated by the vector arg"
end
x() click to toggle source
# File lib/draught/pointlike.rb, line 3
def x
  raise NotImplementedError, "including classes must return an x value"
end
y() click to toggle source
# File lib/draught/pointlike.rb, line 7
def y
  raise NotImplementedError, "including classes must return an y value"
end