Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Oct 16, 2023
1 parent 77975f7 commit 3f92057
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vec2-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import * as utils from './utils.js';
import { Mat3 } from './mat3';
import { Mat4 } from './mat4';
import { Vec2, create, setDefaultType, VecType } from './vec2';
import { Vec3, VecType as Vec3Type } from './vec3';

export default Vec2;
export { create, setDefaultType };
Expand Down Expand Up @@ -359,7 +360,7 @@ export const invert = inverse;
* @returns The vector of a cross b.
*/
export function cross(a: Vec2, b: Vec2, dst?: Vec3): Vec3 {
dst = dst || new VecType(3);
dst = dst || new Vec3Type(3);
const z = a[0] * b[1] - a[1] * b[0];
dst[0] = 0;
dst[1] = 0;
Expand Down

0 comments on commit 3f92057

Please sign in to comment.