Merge pull request #21168 from surtr-isaz/gl-matrix_update

Added missing definition for, fromEuler(), to Quaternion.
This commit is contained in:
Daniel Rosenwasser
2017-11-09 12:05:57 -08:00
committed by GitHub
2 changed files with 14 additions and 1 deletions
+1
View File
@@ -338,6 +338,7 @@ outVal = quat.squaredLength(quatA);
outVal = quat.sqrLen(quatA);
outQuat = quat.normalize(outQuat, quatA);
outVal = quat.dot(quatA, quatB);
outQuat = quat.fromEuler(outQuat, deg90, deg90, deg90);
outQuat = quat.lerp(outQuat, quatA, quatB, 0.5);
outQuat = quat.slerp(outQuat, quatA, quatB, 0.5);
outQuat = quat.invert(outQuat, quatA);
+13 -1
View File
@@ -1,8 +1,9 @@
// Type definitions for gl-matrix 2.3.2
// Type definitions for gl-matrix 2.4
// Project: https://github.com/toji/gl-matrix
// Definitions by: Mattijs Kneppers <https://github.com/mattijskneppers>, based on definitions by Tat <https://github.com/tatchx>
// Nikolay Babanov <https://github.com/nbabanov>
// Austin Martin <https://github.com/auzmartist>
// Wayne Langman <https://github.com/surtr-isaz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'gl-matrix' {
@@ -2943,6 +2944,17 @@ declare module 'gl-matrix' {
*/
public static dot(a: quat, b: quat): number;
/**
* Creates a quaternion from the given euler angle x, y, z.
*
* @param {quat} out the receiving quaternion
* @param {number} x Angle to rotate around X axis in degrees.
* @param {number} y Angle to rotate around Y axis in degrees.
* @param {number} z Angle to rotate around Z axis in degrees.
* @returns {quat} out
*/
public static fromEuler(out: quat, x: number, y: number, z: number): quat;
/**
* Performs a linear interpolation between two quat's
*