Skip to content

Commit

Permalink
Merge pull request #22 from Alchemist0823/patch-1
Browse files Browse the repository at this point in the history
Fix cross product of vec2
  • Loading branch information
greggman authored Oct 16, 2023
2 parents 3402ceb + 66493dd commit 77975f7
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 77975f7

Please sign in to comment.