recp / cglm

📽 Highly Optimized 2D / 3D Graphics Math (glm) for C
MIT License
2.35k stars 231 forks source link

Documentation for non-square matrices should not claim that `mul` function inputs can all be the same matrix #371

Closed v1993 closed 11 months ago

v1993 commented 11 months ago

Example: https://cglm.readthedocs.io/en/latest/mat2x3.html#c.glm_mat2x3_mul

void glm_mat2x3_mul(mat2x3 m1, mat3x2 m2, mat2 dest) multiply m1 and m2 to dest

m1, m2 and dest matrices can be same matrix, it is possible to write this:

glm_mat2x3_mul(m, m, m);

Except that this makes no sense - all three arguments are of different types for non-square matrix multiplication!

EasyIP2023 commented 11 months ago

@recp, @v1993 is correct. Was rushing through doc writing and copied what was in squared matrix docs.

Create MR that deletes that from docs for all non-square matrices please.

recp commented 11 months ago

https://github.com/recp/cglm/commit/75b99ef87d34d07aa0d64058ea12387085369017 should fix this.