Method: Ray::Vector2#dot
- Defined in:
- lib/ray/vector.rb
#dot(vector) ⇒ Float
Returns a.x * b.x + a.y * b.y.
66 67 68 69 |
# File 'lib/ray/vector.rb', line 66 def dot(vector) vector = vector.to_vector2 x * vector.x + y * vector.y end |