module Point::Array

Public Instance Methods

+(other) click to toggle source
# File lib/sixarm_ruby_geometry/point/array.rb, line 11
def +(other)
  raise ::IndexError unless self.size == other.size
  self.size.times.map{|i| self[i] + other[i] }
end
-(other) click to toggle source
# File lib/sixarm_ruby_geometry/point/array.rb, line 16
def -(other)
  raise ::IndexError unless self.size == other.size
  self.size.times.map{|i| self[i] - other[i] }
end