All Point Operations Return New Points
# File lib/rubygl/geometry.rb, line 24 def *(point) Point.new(@x * point.x, @y * point.y, @z * point.z) end
# File lib/rubygl/geometry.rb, line 16 def +(point) Point.new(@x + point.x, @y + point.y, @z + point.z) end
# File lib/rubygl/geometry.rb, line 20 def -(point) Point.new(@x - point.x, @y - point.y, @z - point.z) end
# File lib/rubygl/geometry.rb, line 32 def distance(point) temp = self - point Math::sqrt(temp.x * temp.x + temp.y * temp.y + temp.z * temp.z) end
# File lib/rubygl/geometry.rb, line 38 def midpoint(point) Point.new((@x + point.x) * 0.5, (@y + point.y) * 0.5, (@z + point.z) * 0.5) end
Generated with the Darkfish Rdoc Generator 2.