Method: Processing::Vector#cross
- Defined in:
- lib/processing/vector.rb
#cross(v) ⇒ Numeric #cross(x, y) ⇒ Numeric #cross(x, y, z) ⇒ Numeric
Calculates the cross product of 2 vectors.
546 547 548 549 550 551 |
# File 'lib/processing/vector.rb', line 546 def cross(a, *rest) target = self.class === rest.last ? rest.pop : nil v = self.class.new Rays::Point::cross getInternal__, toVector__(a, *rest).getInternal__ target.set v if self.class === target v end |