summaryrefslogtreecommitdiff
path: root/vec.h
diff options
context:
space:
mode:
Diffstat (limited to 'vec.h')
-rw-r--r--vec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/vec.h b/vec.h
index e3e15b8..84cbaa3 100644
--- a/vec.h
+++ b/vec.h
@@ -76,7 +76,7 @@ struct vec3 {
// cross product (aka outer product, or vector product, producing a vector)
vec3 cross(const vec3 &b) const {
- return vec3{.x=y * b.z - z * b.y, .y=x * b.z - z * b.x, .z=x * b.y - y * b.x};
+ return vec3{.x=y * b.z - z * b.y, .y=z * b.x - x * b.z, .z=x * b.y - y * b.x};
}
// Multiply with b on every dimension.