From d55ebd2e3e7533aad4c09aa551c18be5e4d05b04 Mon Sep 17 00:00:00 2001 From: Mattijs Kneppers Date: Mon, 24 Sep 2018 10:12:10 +0200 Subject: [PATCH] fix (gl-matrix, vec2): fix return type of vec2 cross product --- types/gl-matrix/gl-matrix-tests.ts | 4 ++-- types/gl-matrix/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/gl-matrix/gl-matrix-tests.ts b/types/gl-matrix/gl-matrix-tests.ts index e557acf79d..6894cabbd9 100644 --- a/types/gl-matrix/gl-matrix-tests.ts +++ b/types/gl-matrix/gl-matrix-tests.ts @@ -70,7 +70,7 @@ outVec2 = vec2.negate(outVec2, vec2A); outVec2 = vec2.inverse(outVec2, vec2A); outVec2 = vec2.normalize(outVec2, vec2A); outVal = vec2.dot(vec2A, vec2B); -outVec2 = vec2.cross(outVec3, vec2A, vec2B); +outVec3 = vec2.cross(outVec3, vec2A, vec2B); outVec2 = vec2.lerp(outVec2, vec2A, vec2B, 0.5); outVec2 = vec2.random(outVec2); outVec2 = vec2.random(outVec2, 5.0); @@ -435,7 +435,7 @@ outVec2 = _vec2.negate(outVec2, vec2A); outVec2 = _vec2.inverse(outVec2, vec2A); outVec2 = _vec2.normalize(outVec2, vec2A); outVal = _vec2.dot(vec2A, vec2B); -outVec2 = _vec2.cross(outVec3, vec2A, vec2B); +outVec3 = _vec2.cross(outVec3, vec2A, vec2B); outVec2 = _vec2.lerp(outVec2, vec2A, vec2B, 0.5); outVec2 = _vec2.random(outVec2); outVec2 = _vec2.random(outVec2, 5.0); diff --git a/types/gl-matrix/index.d.ts b/types/gl-matrix/index.d.ts index 33db200cd6..3dc8060aed 100644 --- a/types/gl-matrix/index.d.ts +++ b/types/gl-matrix/index.d.ts @@ -344,7 +344,7 @@ declare module 'gl-matrix' { * @param b the second operand * @returns out */ - public static cross(out: vec3, a: vec2 | number[], b: vec2 | number[]): vec2; + public static cross(out: vec3, a: vec2 | number[], b: vec2 | number[]): vec3; /** * Performs a linear interpolation between two vec2's