Skip to content

Commit

Permalink
Fix cross product of vec2
Browse files Browse the repository at this point in the history
the output type of vec2 cross product is incorrect
  • Loading branch information
Alchemist0823 authored Oct 16, 2023
1 parent 3402ceb commit 66493dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vec2-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ export const invert = inverse;
* @param dst - vector to hold result. If not passed in a new one is created.
* @returns The vector of a cross b.
*/
export function cross(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {
export function cross(a: Vec2, b: Vec2, dst?: Vec3): Vec3 {
dst = dst || new VecType(3);
const z = a[0] * b[1] - a[1] * b[0];
dst[0] = 0;
Expand Down

0 comments on commit 66493dd

Please sign in to comment.