fix (gl-matrix, vec2): fix return type of vec2 cross product

This commit is contained in:
Mattijs Kneppers
2018-09-24 10:26:05 +02:00
parent adf4e18eef
commit d55ebd2e3e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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