lib/triangular/point.rb in triangular-0.0.1 vs lib/triangular/point.rb in triangular-0.0.2
- old
+ new
@@ -11,9 +11,15 @@
def to_s
"#{@x.to_f} #{@y.to_f} #{@z.to_f}"
end
+ def translate!(x, y, z)
+ @x += x
+ @y += y
+ @z += z
+ end
+
def ==(other)
return false unless other.is_a?(Point)
self.x == other.x && self.y == other.y && self.z == other.z
end