class GeometricPoint
Public Class Methods
new_by_array(array)
click to toggle source
# File lib/flash_math/modules/geometry/geometric_point.rb, line 3 def self.new_by_array(array) self.new(array[0], array[1]) end
Public Instance Methods
==(another_point)
click to toggle source
# File lib/flash_math/modules/geometry/geometric_point.rb, line 15 def ==(another_point) x === another_point.x && y === another_point.y end
advance_by(vector)
click to toggle source
# File lib/flash_math/modules/geometry/geometric_point.rb, line 11 def advance_by(vector) GeometricPoint.new(x + vector.x, y + vector.y) end
to_vector()
click to toggle source
# File lib/flash_math/modules/geometry/geometric_point.rb, line 7 def to_vector GeometricVector.new(x, y) end