Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some return types don't include null #456

Open
Stuk opened this issue Feb 3, 2023 · 1 comment
Open

Some return types don't include null #456

Stuk opened this issue Feb 3, 2023 · 1 comment

Comments

@Stuk
Copy link

Stuk commented Feb 3, 2023

The return type for some functions does not include null:

gl-matrix/src/mat4.js

Lines 286 to 293 in 4480752

/**
* Inverts a mat4
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the source matrix
* @returns {mat4} out
*/
export function invert(out, a) {

when in actuality they can return null:

gl-matrix/src/mat4.js

Lines 328 to 330 in 4480752

if (!det) {
return null;
}

This can lead to unexpected runtime errors.

@factscub
Copy link

i would like to work on this issue. please assign me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants