Skip to content

Commit

Permalink
fix(modeling): added new TS definitions for mat4, and adjusted doc st…
Browse files Browse the repository at this point in the history
…rings
  • Loading branch information
z3dev committed Sep 3, 2023
1 parent 1005dab commit a08ec4b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/modeling/src/maths/mat4/invert.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { Mat4 } from './type.d.ts'

export function invert(out: Mat4, matrix: Mat4): Mat4
1 change: 0 additions & 1 deletion packages/modeling/src/maths/mat4/invert.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @author Julian Lloyd
* code from https://github.com/jlmakes/rematrix/blob/master/src/index.js
*
* @typedef {import("./type.d.ts").Mat4} Mat4
* @param {Mat4} out - receiving matrix
* @param {Mat4} matrix - matrix to invert
* @returns {Mat4?} out
Expand Down
3 changes: 3 additions & 0 deletions packages/modeling/src/maths/mat4/isIdentity.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { Mat4 } from './type.d.ts'

export function isIdentity(matrix: Mat4): Mat4
1 change: 0 additions & 1 deletion packages/modeling/src/maths/mat4/isIdentity.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*
* mat4.equals(mat4.create(), matrix)
*
* @typedef {import("./type.d.ts").Mat4} Mat4
* @param {Mat4} matrix - the matrix
* @returns {boolean} true if matrix is the identity transform
* @alias module:modeling/maths/mat4.isIdentity
Expand Down
3 changes: 3 additions & 0 deletions packages/modeling/src/maths/mat4/isOnlyTransformScale.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { Mat4 } from './type.d.ts'

export function isOnlyTransformScale(matrix: Mat4): boolean
1 change: 0 additions & 1 deletion packages/modeling/src/maths/mat4/isOnlyTransformScale.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Determine whether the given matrix is only translate and/or scale.
* This code returns true for TAU / 2 rotation as it can be interpreted as scale.
*
* @typedef {import("./type.d.ts").Mat4} Mat4
* @param {Mat4} matrix - the matrix
* @returns {boolean} true if matrix is for translate and/or scale
* @alias module:modeling/maths/mat4.isOnlyTransformScale
Expand Down

0 comments on commit a08ec4b

Please sign in to comment.