diff options
author | Keuin <[email protected]> | 2022-04-20 22:04:37 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-04-20 22:04:37 +0800 |
commit | 699287623d51be688f2af0a01fedcf90d035da13 (patch) | |
tree | 4c563ebfb810efb78acca0796b5b49d594e69c05 /vec.h | |
parent | bfc5e815e6e157291ad653b9ea97bb12ca8bc835 (diff) |
Bugfix: vec3::cross was implemented and tested incorrectly.
Diffstat (limited to 'vec.h')
-rw-r--r-- | vec.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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. |