Class: Rubygoal::Velocity

Inherits:
Coordinate show all
Defined in:
lib/rubygoal/coordinate.rb

Instance Attribute Summary

Attributes inherited from Coordinate

#x, #y

Instance Method Summary collapse

Methods inherited from Coordinate

#add, #distance, #mult, #to_hash, #to_s

Instance Method Details

#nonzero?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/rubygoal/coordinate.rb', line 29

def nonzero?
  x != 0 || y != 0
end