Method: MiniGL::Vector#==
- Defined in:
- lib/minigl/global.rb
#==(other_vector, precision = 6) ⇒ Object
Returns true if both coordinates of this vector are equal to the corresponding coordinates of other_vector, with precision decimal places of precision.
26 27 28 29 |
# File 'lib/minigl/global.rb', line 26 def ==(other_vector, precision = 6) @x.round(precision) == other_vector.x.round(precision) and @y.round(precision) == other_vector.y.round(precision) end |