Vector products: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 761: | Line 761: | ||
def cross_product(other : Vector) |
def cross_product(other : Vector) |
||
Vector.new(self.y * other.z - self.z * other.y, |
Vector.new(self.y * other.z - self.z * other.y, |
||
self.z * other.x - self.x * other.z, |
self.z * other.x - self.x * other.z, |
||
self.x * other.y - self.y * other.x) |
self.x * other.y - self.y * other.x) |
||
end |
end |
||