diff --git a/types/gl-matrix/gl-matrix-tests.ts b/types/gl-matrix/gl-matrix-tests.ts index 02654491b4..c929323764 100644 --- a/types/gl-matrix/gl-matrix-tests.ts +++ b/types/gl-matrix/gl-matrix-tests.ts @@ -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); diff --git a/types/gl-matrix/index.d.ts b/types/gl-matrix/index.d.ts index e698f2d4bb..cad714796d 100644 --- a/types/gl-matrix/index.d.ts +++ b/types/gl-matrix/index.d.ts @@ -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 , based on definitions by Tat // Nikolay Babanov // Austin Martin +// Wayne Langman // 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 *