\n* ","sha":"02b9dc067a0c9ec2f219a44bc5d16f7ace9e81bf","created_at":"2023-06-14 19:52","time_from_now":"1年前","created_at_unix":1686743533}},{"name":".vscode","path":".vscode","sha":"e53ca17587ad4df60802ffec40c3803e292b72e8","type":"dir","submodule_git_url":null,"size":0,"is_readme_file":false,"content":null,"target":null,"commit":{"message":"vscode settings\n","sha":"92a8e3816275ecfbebfbaec5af6e4fce4e6f9b84","created_at":"2023-03-24 04:18","time_from_now":"1年前","created_at_unix":1679602688}},{"name":"docs","path":"docs","sha":"dc5dd03cfc3462a395097a85d79c715c64665bd0","type":"dir","submodule_git_url":null,"size":0,"is_readme_file":false,"content":null,"target":null,"commit":{"message":"Merge pull request #302 from EasyIP2023/feature/glm_mat3_make\n\nmat3: add new function glm_mat3_make","sha":"31cbd41e3bd75a116f3b1ef9ffd4055c02eb55c6","created_at":"2023-05-15 16:18","time_from_now":"1年前","created_at_unix":1684138721}},{"name":"include","path":"include","sha":"1ad7aa9e9013a7b95540e501677980641f4fab38","type":"dir","submodule_git_url":null,"size":0,"is_readme_file":false,"content":null,"target":null,"commit":{"message":"Fix Singular / Plural in comments\n","sha":"87ae96b847fb6cf7a79a66dc3ddec330b031cba7","created_at":"2023-06-16 16:40","time_from_now":"1年前","created_at_unix":1686904806}},{"name":"src","path":"src","sha":"6587d374168985741c446ebf8c97031eba68150f","type":"dir","submodule_git_url":null,"size":0,"is_readme_file":false,"content":null,"target":null,"commit":{"message":"Merge pull request #302 from EasyIP2023/feature/glm_mat3_make\n\nmat3: add new function glm_mat3_make","sha":"31cbd41e3bd75a116f3b1ef9ffd4055c02eb55c6","created_at":"2023-05-15 16:18","time_from_now":"1年前","created_at_unix":1684138721}},{"name":"test","path":"test","sha":"a4e2e7af383a52ad12f1e56f28747c4170662429","type":"dir","submodule_git_url":null,"size":0,"is_readme_file":false,"content":null,"target":null,"commit":{"message":"suppress some warnings on tests\n","sha":"768d36f4b64d72da29d86ba92432bdcc8ac38bc2","created_at":"2023-06-12 18:15","time_from_now":"1年前","created_at_unix":1686564947}},{"name":"win","path":"win","sha":"66b49f071f08634c9be9318a6a82ce765173014f","type":"dir","submodule_git_url":null,"size":0,"is_readme_file":false,"content":null,"target":null,"commit":{"message":"Add new header to Visual Studio as well\n","sha":"a7cda7f9690452ebeba26d475e0d051f1a970765","created_at":"2023-06-15 21:02","time_from_now":"1年前","created_at_unix":1686834141}},{"name":".gitattributes","path":".gitattributes","sha":"15a5c58091afb6a94589d8366c623c129a78fe40","type":"file","submodule_git_url":null,"size":24,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"Make Github recognize header language as C (#127)\n\nWithout this a lot of `*.h` files are marked as being C++ or Objective-C, even though all of it is C.","sha":"3abf47f175c1cb51042fa6a34837310a675e62d1","created_at":"2020-03-21 03:56","time_from_now":"5年前","created_at_unix":1584734177}},{"name":".gitignore","path":".gitignore","sha":"80631377331bb0a3248b85d93aeac184de9ad219","type":"file","submodule_git_url":null,"size":867,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"Update .gitignore\n","sha":"7dfe67cddefc6aaa5596bfaa9249dd1c7948fecf","created_at":"2022-08-07 16:49","time_from_now":"2年前","created_at_unix":1659862153}},{"name":".gitmodules","path":".gitmodules","sha":"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391","type":"file","submodule_git_url":null,"size":0,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"remove cmocka from submodules and update docs\n","sha":"712cbee580bcec6644ca25bfdceecdee123f5b64","created_at":"2019-09-12 12:10","time_from_now":"5年前","created_at_unix":1568261437}},{"name":".travis.yml","path":".travis.yml","sha":"7d3d6e03fd13d9f539f72246d6cec33ccc4858bb","type":"file","submodule_git_url":null,"size":1057,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"ci, travis: add multiple cpu arch\n","sha":"b953fcf1bdab8a6f27ad75dc0f44fe122060f7f2","created_at":"2020-05-29 05:47","time_from_now":"4年前","created_at_unix":1590702438}},{"name":"CMakeLists.txt","path":"CMakeLists.txt","sha":"d621cc941ccce70e450e859fdd466c49b3ef8195","type":"file","submodule_git_url":null,"size":5092,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"now working on v0.9.1\n","sha":"c4a348ac710191b58770b0c60c30d6ddaaa15ed4","created_at":"2023-05-02 13:22","time_from_now":"1年前","created_at_unix":1683004938}},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","sha":"f25a6ab7bf4b41fac2bcf406b98d5cc61ac0cef8","type":"file","submodule_git_url":null,"size":1568,"is_readme_file":0,"content":null,"target":null,"commit":{"message":"remove cmocka from submodules and update docs\n","sha":"712cbee580bcec6644ca25bfdceecdee123f5b64","created_at":"2019-09-12 12:10","time_from_now":"5年前","created_at_unix":1568261437}},{"name":"CREDITS","path":"CREDITS","sha":"00cc832357480aac091c3a032af70ab3f50355ae","type":"file","submodule_git_url":null,"size":2885,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"pick matrix helper (aka gluPickMatrix)\n","sha":"8427d02a9b0192c216e990a0147cb2daa55730fd","created_at":"2021-08-16 21:53","time_from_now":"3年前","created_at_unix":1629122026}},{"name":"LICENSE","path":"LICENSE","sha":"c92e559da4e4d84b57cb652e8ecca453737a593b","type":"file","submodule_git_url":null,"size":1096,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"move credits to its own file to keep LICENSE more clear\n","sha":"681a74b39c5ad8cd2120819dbcfbc84074bd5425","created_at":"2018-02-18 15:46","time_from_now":"7年前","created_at_unix":1518939977}},{"name":"Makefile.am","path":"Makefile.am","sha":"1eeb9884a9b7043315e94fd6ff9d4d686d132c74","type":"file","submodule_git_url":null,"size":11008,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"Add affine-mat.h to the Makefile\n","sha":"c4d4c4851822996ad147db7ce2354c78e3cad0e9","created_at":"2023-06-15 20:54","time_from_now":"1年前","created_at_unix":1686833694}},{"name":"Package.swift","path":"Package.swift","sha":"ac0f7e43bdd7ea9d589ab712e85fd07962d33042","type":"file","submodule_git_url":null,"size":1032,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"Updated 160 PR according review comments.\n","sha":"2e5257bcc1b43eda0bd97e47c42e8ddd9eadd64f","created_at":"2020-09-08 08:09","time_from_now":"4年前","created_at_unix":1599523777}},{"name":"README.md","path":"README.md","sha":"17b7027c9d23b7eb2acd8170d77e7981eb5a124e","type":"file","submodule_git_url":null,"size":19603,"is_readme_file":true,"content":null,"target":null,"commit":{"message":"README: update meson option for running test\n\nRunning on an already built build directory\n\nmeson configure -Denable_tests=true build/\n\nLeads to\n\nERROR: Unknown options: \"enable_tests\"\n\nSeems the meson option was updated\n\nSigned-off-by: Vincent Davis Jr \n","sha":"2631d3b5eaf94c96ee310771e07e8aa4ab8690c4","created_at":"2023-05-15 08:38","time_from_now":"1年前","created_at_unix":1684111138}},{"name":"_config.yml","path":"_config.yml","sha":"2f7efbeab578c8042531ea7908ee8ffd7589fe46","type":"file","submodule_git_url":null,"size":27,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"Set theme jekyll-theme-minimal","sha":"f660170497cb79cc805453259db5793789093f16","created_at":"2017-02-10 04:42","time_from_now":"8年前","created_at_unix":1486672927}},{"name":"appveyor.yml","path":"appveyor.yml","sha":"f4c54ef9276885652f32dc8a7616c660a88d1aec","type":"file","submodule_git_url":null,"size":78,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"ci: set appveyor image\n","sha":"d5371f10a193696ce22fd0d13bed63f28091d857","created_at":"2017-04-22 20:17","time_from_now":"7年前","created_at_unix":1492863456}},{"name":"autogen.sh","path":"autogen.sh","sha":"b3b8d8286b88d6df586755afbc81fcdee0406516","type":"file","submodule_git_url":null,"size":311,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"build: improve calling libtoolize\n","sha":"22b699174c9a8bb6f2483f8a678b09146ba6ce5e","created_at":"2018-04-19 02:47","time_from_now":"6年前","created_at_unix":1524077273}},{"name":"cglm.pc.in","path":"cglm.pc.in","sha":"b80b4017cf346b7f04e9f5c279dea6f6df432476","type":"file","submodule_git_url":null,"size":265,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"Revert \"fix: simplified pkgconfig generation\"\n\nThis reverts commit c7393f75c369b178f5aaab8cee45870866a6a379.\n","sha":"9c7012bb39ee16c2fb491799de30d6d4bcab5969","created_at":"2022-12-19 06:14","time_from_now":"2年前","created_at_unix":1671401682}},{"name":"cglm.png","path":"cglm.png","sha":"b450f6aafcd90837f5960fe208e062ffdfc7eeb2","type":"file","submodule_git_url":null,"size":387622,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"Create cglm.png\n","sha":"e83940f3b12e2072827d2c4f48b6ca781c21e4dc","created_at":"2021-05-30 22:48","time_from_now":"3年前","created_at_unix":1622386109}},{"name":"cglm.podspec","path":"cglm.podspec","sha":"080786afd5326b7b7792e00d1883831cb7b6a267","type":"file","submodule_git_url":null,"size":1288,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"now working on v0.9.1\n","sha":"c4a348ac710191b58770b0c60c30d6ddaaa15ed4","created_at":"2023-05-02 13:22","time_from_now":"1年前","created_at_unix":1683004938}},{"name":"configure.ac","path":"configure.ac","sha":"44ff73899ee88237247f8ef4ab82f1a1ac93f249","type":"file","submodule_git_url":null,"size":2099,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"now working on v0.9.1\n","sha":"c4a348ac710191b58770b0c60c30d6ddaaa15ed4","created_at":"2023-05-02 13:22","time_from_now":"1年前","created_at_unix":1683004938}},{"name":"meson.build","path":"meson.build","sha":"69d73e2fbb5c60e8313e0d1ffa74150b9fc8ad3a","type":"file","submodule_git_url":null,"size":2926,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"now working on v0.9.1\n","sha":"c4a348ac710191b58770b0c60c30d6ddaaa15ed4","created_at":"2023-05-02 13:22","time_from_now":"1年前","created_at_unix":1683004938}},{"name":"meson_options.txt","path":"meson_options.txt","sha":"fb3ced8a2e95717795f53c1891ee487390a49d13","type":"file","submodule_git_url":null,"size":223,"is_readme_file":null,"content":null,"target":null,"commit":{"message":"meson: add 'install' option\n\nThis is useful for people who want to use cglm as a meson subproject\nwithout polluting the main project's install target.\n","sha":"2a2d51624bebc32d0e394568d873614ebcdc87a3","created_at":"2020-11-09 02:27","time_from_now":"4年前","created_at_unix":1604860044}}]},"projectMenu":[{"menu_name":"home"},{"menu_name":"code"},{"menu_name":"issues"},{"menu_name":"pulls"},{"menu_name":"devops"},{"menu_name":"versions"},{"menu_name":"wiki"},{"menu_name":"resources"},{"menu_name":"activity"}],"projectReadMe":"%7B%22type%22%3A%22file%22%2C%22encoding%22%3A%22base64%22%2C%22size%22%3A19603%2C%22name%22%3A%22README.md%22%2C%22path%22%3A%22README.md%22%2C%22content%22%3A%22%23%20%F0%9F%8E%A5%20OpenGL%20Mathematics%20(glm)%20for%20%60C%60%5Cn%5Cn%3Cp%20align%3D%5C%22center%5C%22%3E%5Cn%20%20%20%3Cimg%20alt%3D%5C%22%5C%22%20src%3D%5C%22cglm.png%5C%22%20width%3D%5C%22550%5C%22%20%2F%3E%5Cn%3C%2Fp%3E%5Cn%3Cbr%3E%5Cn%3Cp%20align%3D%5C%22center%5C%22%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22https%3A%2F%2Ftravis-ci.com%2Frecp%2Fcglm%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Ftravis-ci.com%2Frecp%2Fcglm.svg%3Fbranch%3Dmaster%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Build%20Status%5C%22%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22https%3A%2F%2Fci.appveyor.com%2Fproject%2Frecp%2Fcglm%2Fbranch%2Fmaster%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fci.appveyor.com%2Fapi%2Fprojects%2Fstatus%2Fav7l3gc0yhfex8y4%2Fbranch%2Fmaster%3Fsvg%3Dtrue%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Windows%20Build%20Status%5C%22%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22http%3A%2F%2Fcglm.readthedocs.io%2Fen%2Flatest%2F%3Fbadge%3Dlatest%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Freadthedocs.org%2Fprojects%2Fcglm%2Fbadge%2F%3Fversion%3Dlatest%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Documentation%20Status%5C%22%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22https%3A%2F%2Fwww.codacy.com%2Fapp%2Frecp%2Fcglm%3Futm_source%3Dgithub.com%26amp%3Butm_medium%3Dreferral%26amp%3Butm_content%3Drecp%2Fcglm%26amp%3Butm_campaign%3DBadge_Grade%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fapi.codacy.com%2Fproject%2Fbadge%2FGrade%2F6a62b37d5f214f178ebef269dc4a6bf1%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Codacy%20Badge%5C%22%2F%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22https%3A%2F%2Fcoveralls.io%2Fgithub%2Frecp%2Fcglm%3Fbranch%3Dmaster%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fcoveralls.io%2Frepos%2Fgithub%2Frecp%2Fcglm%2Fbadge.svg%3Fbranch%3Dmaster%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Coverage%20Status%5C%22%2F%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22https%3A%2F%2Fcodecov.io%2Fgh%2Frecp%2Fcglm%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fcodecov.io%2Fgh%2Frecp%2Fcglm%2Fbranch%2Fmaster%2Fgraph%2Fbadge.svg%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Coverage%20Status%5C%22%2F%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22%23sponsors%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsors%2Fbadge.svg%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Sponsors%20on%20Open%20Collective%5C%22%2F%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22%23backers%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fbackers%2Fbadge.svg%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Backers%20on%20Open%20Collective%5C%22%2F%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%3C%2Fp%3E%5Cn%5Cn%3Cbr%3E%5Cn%5Cn%3Cp%20align%3D%5C%22center%5C%22%3E%5CnHighly%20optimized%202D%7C3D%20math%20library%2C%20also%20known%20as%20%3Cb%3EOpenGL%20Mathematics%20(glm)%20for%20%60C%60%3C%2Fb%3E.%20%3Cb%3Ecglm%3C%2Fb%3E%20provides%20lot%20of%20utils%20to%20help%20math%20operations%20to%20be%20fast%20and%20quick%20to%20write.%20It%20is%20community%20friendly%2C%20feel%20free%20to%20bring%20any%20issues%2C%20bugs%20you%20faced.%20%5Cn%3C%2Fp%3E%5Cn%5Cn---%5Cn%5Cn%23%23%23%23%20%F0%9F%93%9A%20Documentation%5Cn%5CnAlmost%20all%20functions%20(inline%20versions)%20and%20parameters%20are%20documented%20inside%20the%20corresponding%20headers.%20%3Cbr%20%2F%3E%5CnComplete%20documentation%3A%20http%3A%2F%2Fcglm.readthedocs.io%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Note%20for%20previous%20versions%3A%5Cn%5Cn-%20_dup%20(duplicate)%20is%20changed%20to%20_copy.%20For%20instance%20%60glm_vec_dup%20-%3E%20glm_vec3_copy%60%5Cn-%20OpenGL%20related%20functions%20are%20dropped%20to%20make%20this%20lib%20platform%2Fthird-party%20independent%5Cn-%20make%20sure%20you%20have%20latest%20version%20and%20feel%20free%20to%20report%20bugs%2C%20troubles%5Cn-%20**%5Bbugfix%5D**%20euler%20angles%20was%20implemented%20in%20reverse%20order%20(extrinsic)%20it%20was%20fixed%2C%20now%20they%20are%20intrinsic.%20Make%20sure%20that%5Cnyou%20have%20the%20latest%20version%5Cn-%20**%5Bmajor%20change%5D**%20by%20starting%20v0.4.0%2C%20quaternions%20are%20stored%20as%20%5Bx%2C%20y%2C%20z%2C%20w%5D%2C%20it%20was%20%5Bw%2C%20x%2C%20y%2C%20z%5D%20in%20v0.3.5%20and%20earlier%20versions%5Cn-%20**%5Bapi%20rename%5D**%20by%20starting%20v0.4.5%2C%20**glm_simd**%20functions%20are%20renamed%20to%20**glmm_**%20%20%5Cn-%20**%5Bnew%20option%5D**%20by%20starting%20v0.4.5%2C%20you%20can%20disable%20alignment%20requirement%2C%20check%20options%20in%20docs.%20%20%5Cn-%20**%5Bmajor%20change%5D**%20by%20starting%20v0.5.0%2C%20vec3%20functions%20use%20**glm_vec3_**%20namespace%2C%20it%20was%20**glm_vec_**%20until%20v0.5.0%5Cn-%20**%5Bmajor%20change%5D**%20by%20starting%20v0.5.1%2C%20built-in%20alignment%20is%20removed%20from%20**vec3**%20and%20**mat3**%20types%5Cn-%20**%5Bmajor%20change%5D**%20by%20starting%20v0.7.3%2C%20inline%20print%20functions%20are%20disabled%20in%20release%2Fproduction%20mode%20to%20eliminate%20print%20costs%20(see%20options%20in%20documentation).%20Print%20output%20also%20improved.%20You%20can%20disable%20colors%20if%20you%20need%20%20(see%20documentation)%5Cn-%20**%5Bmajor%20change%5D**%20by%20starting%20v0.8.3%2C%20**cglm**%20supports%20alternative%20clipspace%20configuations%20e.g.%20Left%20Handed%2C%20Zero-to-One%20(_zo)...%20%60CGLM_FORCE_DEPTH_ZERO_TO_ONE%60%20and%20%60CGLM_FORCE_LEFT_HANDED%60%20is%20provided%20to%20control%20clipspace.%20You%20should%20be%20able%20to%20use%20**cglm**%20with%20Vulkan%2C%20DirectX%20and%20Metal%20now...%20see%20https%3A%2F%2Fcglm.readthedocs.io%2Fen%2Flatest%2Fopt.html%23clipspace-option-s%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Note%20for%20C%2B%2B%20developers%3A%5CnIf%20you%20are%20not%20aware%20of%20the%20original%20GLM%20library%20yet%2C%20you%20may%20also%20want%20to%20look%20at%3A%5Cnhttps%3A%2F%2Fgithub.com%2Fg-truc%2Fglm%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Note%20for%20new%20comers%20(Important)%3A%5Cn-%20%60vec4%60%20and%20%60mat4%60%20variables%20must%20be%20aligned.%20(There%20will%20be%20unaligned%20versions%20later)%5Cn-%20**in**%20and%20**%5Bin%2C%20out%5D**%20parameters%20must%20be%20initialized%20(please).%20But%20**%5Bout%5D**%20parameters%20not%2C%20initializing%20out%20param%20is%20%20also%20redundant%5Cn-%20All%20functions%20are%20inline%20if%20you%20don't%20want%20to%20use%20pre-compiled%20versions%20with%20glmc_%20prefix%2C%20you%20can%20ignore%20build%20process.%20Just%20include%20headers.%5Cn-%20if%20your%20debugger%20takes%20you%20to%20cglm%20headers%20then%20make%20sure%20you%20are%20not%20trying%20to%20copy%20vec4%20to%20vec3%20or%20alig%20issues...%5Cn-%20Welcome!%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Note%20for%20experienced%20developers%3A%5Cn-%20Since%20I'm%20testing%20this%20library%20in%20my%20projects%2C%20sometimes%20bugs%20occurs%3B%20finding%20that%20bug%5Bs%5D%20and%20making%20improvements%20would%20be%20more%20easy%20with%20multiple%20developer%2Fcontributor%20and%20their%20projects%20or%20knowledge.%20Consider%20to%20make%20some%20tests%20if%20you%20suspect%20something%20is%20wrong%20and%20any%20feedbacks%2C%20contributions%20and%20bug%20reports%20are%20always%20welcome.%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Allocations%3F%5Cn%60cglm%60%20doesn't%20alloc%20any%20memory%20on%20heap.%20So%20it%20doesn't%20provide%20any%20allocator.%20You%20should%20alloc%20memory%20for%20**out**%20parameters%20too%20if%20you%20pass%20pointer%20of%20memory%20location.%20Don't%20forget%20that%20**vec4**%20(also%20quat%2F**versor**)%20and%20**mat4**%20must%20be%20aligned%20(16-bytes)%2C%20because%20*cglm*%20uses%20SIMD%20instructions%20to%20optimize%20most%20operations%20if%20available.%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Returning%20vector%20or%20matrix...%20%3F%5Cn%5Cn**cglm**%20supports%20both%20*ARRAY%20API*%20and%20*STRUCT%20API*%2C%20so%20you%20can%20return%20structs%20if%20you%20utilize%20struct%20api%20(%60glms_%60).%5Cn%5Cn%3Chr%2F%3E%5Cn%5Cn%3Ctable%3E%5Cn%20%20%3Ctbody%3E%5Cn%20%20%20%20%3Ctr%3E%5Cn%20%20%20%20%20%20%3Ctd%3E%5Cn%20%20%20%20%20%20%20%20%3Cdiv%3ELike%20some%20other%20graphics%20libraries%20(especially%20OpenGL)%20this%20library%20use%20Column-Major%20layout%20to%20keep%20matrices%20in%20the%20memory.%20%3C%2Fdiv%3E%5Cn%20%20%20%20%20%20%20%20%3Cdiv%3E%26nbsp%3B%3C%2Fdiv%3E%5Cn%20%20%20%20%20%20%20%20%3Cdiv%3EIn%20the%20future%20the%20library%20may%20support%20an%20option%20to%20use%20row-major%20layout%2C%20CURRENTLY%20if%20you%20need%20to%20row-major%20layout%20you%20will%20need%20to%20transpose%20it.%20%3C%2Fdiv%3E%5Cn%20%20%20%20%20%20%3C%2Ftd%3E%5Cn%20%20%20%20%20%20%3Ctd%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F3%2F3f%2FMatrix_Columns.svg%5C%22%20width%3D%5C%22300px%5C%22%20%2F%3E%5Cn%20%20%20%20%20%20%3C%2Ftd%3E%5Cn%20%20%20%20%3C%2Ftr%3E%5Cn%20%20%3C%2Ftbody%3E%5Cn%3C%2Ftable%3E%5Cn%5Cn%23%23%20%F0%9F%9A%80%20Features%5Cn-%20**scalar**%20and%20**simd**%20(sse%2C%20avx%2C%20neon...)%20optimizations%5Cn-%20option%20to%20use%20different%20clipspaces%20e.g.%20Left%20Handed%2C%20Zero-to-One...%20(currrently%20right%20handed%20negative-one%20is%20default)%5Cn-%20array%20api%20and%20struct%20api%2C%20you%20can%20use%20arrays%20or%20structs.%5Cn-%20general%20purpose%20matrix%20operations%20(mat4%2C%20mat3)%5Cn-%20chain%20matrix%20multiplication%20(square%20only)%5Cn-%20general%20purpose%20vector%20operations%20(cross%2C%20dot%2C%20rotate%2C%20proj%2C%20angle...)%5Cn-%20affine%20transformations%5Cn-%20matrix%20decomposition%20(extract%20rotation%2C%20scaling%20factor)%5Cn-%20optimized%20affine%20transform%20matrices%20(mul%2C%20rigid-body%20inverse)%5Cn-%20camera%20(lookat)%5Cn-%20projections%20(ortho%2C%20perspective)%5Cn-%20quaternions%5Cn-%20euler%20angles%20%2F%20yaw-pitch-roll%20to%20matrix%5Cn-%20extract%20euler%20angles%5Cn-%20inline%20or%20pre-compiled%20function%20call%5Cn-%20frustum%20(extract%20view%20frustum%20planes%2C%20corners...)%5Cn-%20bounding%20box%20(AABB%20in%20Frustum%20(culling)%2C%20crop%2C%20merge...)%5Cn-%20bounding%20sphere%5Cn-%20project%2C%20unproject%5Cn-%20easing%20functions%5Cn-%20curves%5Cn-%20curve%20interpolation%20helpers%20(S*M*C%2C%20deCasteljau...)%5Cn-%20helpers%20to%20convert%20cglm%20types%20to%20Apple's%20simd%20library%20to%20pass%20cglm%20types%20to%20Metal%20GL%20without%20packing%20them%20on%20both%20sides%5Cn-%20ray%20intersection%20helpers%5Cn-%20and%20others...%5Cn%5Cn%3Chr%20%2F%3E%5Cn%5CnYou%20have%20two%20options%20to%20call%20a%20function%2Foperation%3A%20inline%20or%20library%20call%20(link)%5CnAlmost%20all%20functions%20are%20marked%20inline%20(always_inline)%20so%20compiler%20will%20probably%20inline.%5CnTo%20call%20pre-compiled%20versions%2C%20just%20use%20%60glmc_%60%20(c%20stands%20for%20'call')%20instead%20of%20%60glm_%60.%5Cn%5Cn%60%60%60C%5Cn%20%20%23include%20%3Ccglm%2Fcglm.h%3E%20%20%20%2F*%20for%20inline%20*%2F%5Cn%20%20%23include%20%3Ccglm%2Fcall.h%3E%20%20%20%2F*%20for%20library%20call%20(this%20also%20includes%20cglm.h)%20*%2F%5Cn%5Cn%20%20mat4%20rot%2C%20trans%2C%20rt%3B%5Cn%20%20%2F*%20...%20*%2F%5Cn%20%20glm_mul(trans%2C%20rot%2C%20rt)%3B%20%20%2F*%20inline%20*%2F%5Cn%20%20glmc_mul(trans%2C%20rot%2C%20rt)%3B%20%2F*%20call%20from%20library%20*%2F%5Cn%60%60%60%5CnMost%20of%20math%20functions%20are%20optimized%20manualy%20with%20SSE2%20if%20available%2C%20if%20not%3F%20Dont%20worry%20there%20are%20non-sse%20versions%20of%20all%20operations%5Cn%5CnYou%20can%20pass%20matrices%20and%20vectors%20as%20array%20to%20functions%20rather%20than%20get%20address.%5Cn%5Cn%60%60%60C%5Cn%20%20mat4%20m%20%3D%20%7B%5Cn%20%20%20%201%2C%200%2C%200%2C%200%2C%5Cn%20%20%20%200%2C%201%2C%200%2C%200%2C%5Cn%20%20%20%200%2C%200%2C%201%2C%200%2C%5Cn%20%20%20%200%2C%200%2C%200%2C%201%5Cn%20%20%7D%3B%5Cn%5Cn%20%20glm_translate(m%2C%20(vec3)%7B1.0f%2C%200.0f%2C%200.0f%7D)%3B%5Cn%60%60%60%5Cn%5CnLibrary%20contains%20general%20purpose%20mat4%20mul%20and%20inverse%20functions%2C%20and%20also%20contains%20some%20special%20forms%20(optimized)%20of%20these%20functions%20for%20affine%20transformations'%20matrices.%20If%20you%20want%20to%20multiply%20two%20affine%20transformation%20matrices%20you%20can%20use%20glm_mul%20instead%20of%20glm_mat4_mul%20and%20glm_inv_tr%20(ROT%20%2B%20TR)%20instead%20glm_mat4_inv%5Cn%60%60%60C%5Cn%2F*%20multiplication%20*%2F%5Cnmat4%20modelMat%3B%5Cnglm_mul(T%2C%20R%2C%20modelMat)%3B%5Cn%5Cn%2F*%20othonormal%20rot%20%2B%20tr%20matrix%20inverse%20(rigid-body)%20*%2F%5Cnglm_inv_tr(modelMat)%3B%5Cn%60%60%60%5Cn%5Cn%23%23%23%20Struct%20API%5Cn%5CnThe%20struct%20API%20works%20as%20follows%2C%20note%20the%20%60s%60%20suffix%20on%20types%2C%20the%20%60glms_%60%20prefix%20on%20functions%20and%20the%20%60GLMS_%60%20prefix%20on%20constants%3A%5Cn%5Cn%60%60%60C%5Cn%23include%20%3Ccglm%2Fstruct.h%3E%5Cn%5Cnmat4s%20mat%20%3D%20GLMS_MAT4_IDENTITY_INIT%3B%5Cnmat4s%20inv%20%3D%20glms_mat4_inv(mat)%3B%5Cn%60%60%60%5Cn%5CnStruct%20functions%20generally%20take%20their%20parameters%20as%20*values*%20and%20*return*%20their%20results%2C%20rather%20than%20taking%20pointers%20and%20writing%20to%20out%20parameters.%20That%20means%20your%20parameters%20can%20usually%20be%20%60const%60%2C%20if%20you're%20into%20that.%5Cn%5CnThe%20types%20used%20are%20actually%20unions%20that%20allow%20access%20to%20the%20same%20data%20multiple%20ways.%20One%20of%20those%20ways%20involves%20anonymous%20structures%2C%20available%20since%20C11.%20MSVC%20also%20supports%20it%20for%20earlier%20C%20versions%20out%20of%20the%20box%20and%20GCC%2FClang%20do%20if%20you%20enable%20%60-fms-extensions%60.%20To%20explicitly%20enable%20these%20anonymous%20structures%2C%20%60%23define%20CGLM_USE_ANONYMOUS_STRUCT%60%20to%20%601%60%2C%20to%20disable%20them%2C%20to%20%600%60.%20For%20backward%20compatibility%2C%20you%20can%20also%20%60%23define%20CGLM_NO_ANONYMOUS_STRUCT%60%20(value%20is%20irrelevant)%20to%20disable%20them.%20If%20you%20don't%20specify%20explicitly%2C%20cglm%20will%20do%20a%20best%20guess%20based%20on%20your%20compiler%20and%20the%20C%20version%20you're%20using.%5Cn%5Cn%23%23%20%F0%9F%94%A8%20Build%5Cn%5Cn%23%23%23%20CMake%20(All%20platforms)%5Cn%60%60%60bash%5Cn%24%20mkdir%20build%5Cn%24%20cd%20build%5Cn%24%20cmake%20..%20%23%20%5BOptional%5D%20-DCGLM_SHARED%3DON%5Cn%24%20make%5Cn%24%20sudo%20make%20install%20%23%20%5BOptional%5D%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%23%20Cmake%20options%20with%20Defaults%3A%5Cn%5Cn%60%60%60CMake%5Cnoption(CGLM_SHARED%20%5C%22Shared%20build%5C%22%20ON)%5Cnoption(CGLM_STATIC%20%5C%22Static%20build%5C%22%20OFF)%5Cnoption(CGLM_USE_C99%20%5C%22%5C%22%20OFF)%20%23%C2%A0C11%20%5Cnoption(CGLM_USE_TEST%20%5C%22Enable%20Tests%5C%22%20OFF)%20%23%C2%A0for%20make%20check%20-%20make%20test%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%20Use%20as%20header-only%20library%20with%20your%20CMake%20project%5Cn%5CnThis%20requires%20no%20building%20or%20installation%20of%20cglm.%5Cn%5Cn*%20Example%3A%5Cn%5Cn%60%60%60%20cmake%5Cncmake_minimum_required(VERSION%203.8.2)%5Cn%5Cnproject(%3CYour%20Project%20Name%3E)%5Cn%5Cnadd_executable(%24%7BPROJECT_NAME%7D%20src%2Fmain.c)%5Cntarget_link_libraries(%24%7BLIBRARY_NAME%7D%20PRIVATE%5Cn%20%20cglm_headers)%5Cn%5Cnadd_subdirectory(external%2Fcglm%2F%20EXCLUDE_FROM_ALL)%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%20Use%20with%20your%20CMake%20project%5Cn*%20Example%3A%5Cn%60%60%60cmake%5Cncmake_minimum_required(VERSION%203.8.2)%5Cn%5Cnproject(%3CYour%20Project%20Name%3E)%5Cn%5Cnadd_executable(%24%7BPROJECT_NAME%7D%20src%2Fmain.c)%5Cntarget_link_libraries(%24%7BLIBRARY_NAME%7D%20PRIVATE%5Cn%20%20cglm)%5Cn%5Cnadd_subdirectory(external%2Fcglm%2F)%5Cn%5Cn%23%20or%20you%20can%20use%20find_package%20to%20configure%20cglm%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%20Use%20CMake%20to%20build%20for%20WebAssembly%5Cn%5CnSince%20math%20functions%20like%20%60sinf%60%20is%20used%2C%20this%20can%20not%20be%20targeted%20at%20%60wasm32-unknown-unknown%60%2C%20one%20of%20%5Bwasi-sdk%5D(https%3A%2F%2Fgithub.com%2FWebAssembly%2Fwasi-sdk)%20or%20%5Bemscripten%5D(https%3A%2F%2Fgithub.com%2Femscripten-core%2Femsdk)%20should%20be%20used.%5Cn%5CnShould%20note%20that%20shared%20build%20is%20not%20yet%20supported%20for%20WebAssembly.%5Cn%5CnFor%20%5Bsimd128%5D(https%3A%2F%2Fgithub.com%2FWebAssembly%2Fsimd)%20support%2C%20add%20%60-msimd128%60%20to%20%60CMAKE_C_FLAGS%60%2C%20in%20command%20line%20%60-DCMAKE_C_FLAGS%3D%5C%22-msimd128%5C%22%60.%5Cn%5CnFor%20tests%2C%20the%20cmake%20option%20%60CGLM_USE_TEST%60%20would%20still%20work%2C%20you'll%20need%20a%20wasi%20runtime%20for%20running%20tests%2C%20see%20our%20%5Bci%20config%20file%5D(.github%2Fworkflows%2Fcmake-wasm.yml)%20for%20a%20detailed%20example.%5Cn%5Cn%23%23%23%23%23%20Use%20CMake%20and%20WASI%20SDK%20to%20build%20for%20WebAssembly%5Cn%5Cn%60%60%60bash%5Cn%24%20cmake%20..%20%5C%5C%5Cn%20%20-DCMAKE_TOOLCHAIN_FILE%3D%2Fpath%2Fto%2Fwasi-sdk-19.0%2Fshare%2Fcmake%2Fwasi-sdk.cmake%20%5C%5C%5Cn%20%20-DWASI_SDK_PREFIX%3D%2Fpath%2Fto%2Fwasi-sdk-19.0%5Cn%60%60%60%5Cn%5CnWhere%20%60%2Fpath%2Fto%2Fwasi-sdk-19.0%2F%60%20is%20the%20path%20to%20extracted%20%5Bwasi%20sdk%5D(https%3A%2F%2Fgithub.com%2FWebAssembly%2Fwasi-sdk).%5Cn%5CnIn%20this%20case%20it%20would%20by%20default%20make%20a%20static%20build.%5Cn%5Cn%23%23%23%23%23%20Use%20CMake%20and%20Emscripten%20SDK%20to%20build%20for%20WebAssembly%5Cn%5Cn%60%60%60bash%5Cn%24%20emcmake%20cmake%20..%20%5C%5C%5Cn%20%20-DCMAKE_EXE_LINKER_FLAGS%3D%5C%22-s%20STANDALONE_WASM%5C%22%20%5C%5C%5Cn%20%20-DCGLM_STATIC%3DON%5Cn%60%60%60%5Cn%5CnThe%20%60emcmake%60%20here%20is%20the%20cmake%20wrapper%20for%20Emscripten%20from%20installed%20%5Bemsdk%5D(https%3A%2F%2Fgithub.com%2Femscripten-core%2Femsdk).%5Cn%5Cn%23%23%23%20Meson%20(All%20platforms)%5Cn%5Cn%60%60%60bash%5Cn%24%20meson%20build%20%23%20%5BOptional%5D%20--default-library%3Dstatic%5Cn%24%20cd%20build%5Cn%24%20ninja%5Cn%24%20sudo%20ninja%20install%20%23%20%5BOptional%5D%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%23%20Meson%20options%20with%20Defaults%3A%5Cn%5Cn%60%60%60meson%5Cnc_std%3Dc11%5Cnbuildtype%3Drelease%5Cndefault_library%3Dshared%5Cnbuild_tests%3Dtrue%20%23%C2%A0to%20run%20tests%3A%20ninja%20test%5Cn%60%60%60%5Cn%23%23%23%23%20Use%20with%20your%20Meson%20project%5Cn*%20Example%3A%5Cn%60%60%60meson%5Cn%23%20Clone%20cglm%20or%20create%20a%20cglm.wrap%20under%20%3Csource_root%3E%2Fsubprojects%5Cnproject('name'%2C%20'c')%5Cn%5Cncglm_dep%20%3D%20dependency('cglm'%2C%20fallback%20%3A%20'cglm'%2C%20'cglm_dep')%5Cn%5Cnexecutable('exe'%2C%20'src%2Fmain.c'%2C%20dependencies%20%3A%20cglm_dep)%5Cn%60%60%60%5Cn%5Cn%23%23%23%20Swift%20(Swift%20Package%20Manager)%5Cn%5CnCurrently%20only%20default%20build%20options%20are%20supported.%20Add%20**cglm**%20dependency%20to%20your%20project%3A%5Cn%5Cn%60%60%60swift%5Cn...%5CnPackage(%20%5Cn%20%20...%5Cn%20%20dependencies%3A%20%5B%5Cn%20%20%20%20...%5Cn%20%20%20%20.package(url%3A%20%5C%22https%3A%2F%2Fgithub.com%2Frecp%2Fcglm%5C%22%2C%20.branch(%5C%22master%5C%22))%2C%5Cn%20%20%5D%5Cn%20%20...%5Cn)%5Cn%60%60%60%5Cn%5CnNow%20add%20**cgml**%20as%20a%20dependency%20to%20your%20target.%20Product%20choices%20are%3A%5Cn-%20**cglm**%20for%20inlined%20version%20of%20the%20library%20which%20can%20be%20linked%20only%20statically%5Cn-%20**cglmc**%20for%20a%20compiled%20version%20of%20the%20library%20with%20no%20linking%20limitation%5Cn%5Cn%60%60%60swift%5Cn...%5Cn.target(%5Cn%20%20...%5Cn%20%20dependencies%3A%20%5B%5Cn%20%20%20%20...%5Cn%20%20%20%20.product(name%3A%20%5C%22cglm%5C%22%2C%20package%3A%20%5C%22cglm%5C%22)%2C%5Cn%20%20%5D%5Cn%20%20...%5Cn)%5Cn...%5Cn%60%60%60%5Cn%5Cn%23%23%23%20Unix%20(Autotools)%5Cn%5Cn%60%60%60bash%5Cn%24%20sh%20autogen.sh%5Cn%24%20.%2Fconfigure%5Cn%24%20make%5Cn%24%20make%20check%20%23%20%5BOptional%5D%5Cn%24%20%5Bsudo%5D%20make%20install%20%23%20%5BOptional%5D%5Cn%60%60%60%5Cn%5CnThis%20will%20also%20install%20pkg-config%20files%20so%20you%20can%20use%5Cn%60pkg-config%20--cflags%20cglm%60%20and%20%60pkg-config%20--libs%20cglm%60%20to%20retrieve%20compiler%5Cnand%20linker%20flags.%5Cn%5CnThe%20files%20will%20be%20installed%20into%20the%20given%20prefix%20(usually%20%60%2Fusr%2Flocal%60%20by%5Cndefault%20on%20Linux)%2C%20but%20your%20pkg-config%20may%20not%20be%20configured%20to%20actually%20check%5Cnthere.%20You%20can%20figure%20out%20where%20it's%20looking%20by%20running%20%60pkg-config%20--variable%5Cnpc_path%20pkg-config%60%20and%20change%20the%20path%20the%20files%20are%20installed%20to%20via%5Cn%60.%2Fconfigure%20--with-pkgconfigdir%3D%2Fyour%2Fpath%60.%20Alternatively%2C%20you%20can%20add%20the%5Cnprefix%20path%20to%20your%20%60PKG_CONFIG_PATH%60%20environment%20variable.%5Cn%5Cn%23%23%23%20Windows%20(MSBuild)%5CnWindows%20related%20build%20file%20and%20project%20files%20are%20located%20in%20%60win%60%20folder%2C%5Cnmake%20sure%20you%20are%20inside%20%60cglm%2Fwin%60%20folder.%5CnCode%20Analysis%20is%20enabled%2C%20so%20it%20may%20take%20awhile%20to%20build.%5Cn%5Cn%60%60%60Powershell%5Cn%24%20cd%20win%5Cn%24%20.%5C%5Cbuild.bat%5Cn%60%60%60%5Cnif%20%60msbuild%60%20won't%20work%20(because%20of%20multi%20version%20VS)%20then%20try%20to%20build%20with%20%60devenv%60%3A%5Cn%60%60%60Powershell%5Cn%24%20devenv%20cglm.sln%20%2FBuild%20Release%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%20Running%20Tests%20on%20Windows%5Cn%5CnYou%20can%20see%20test%20project%20in%20same%20visual%20studio%20solution%20file.%20It%20is%20enough%20to%20run%20that%20project%20to%20run%20tests.%5Cn%5Cn%23%23%23%20Building%20Docs%5CnFirst%20you%20need%20install%20Sphinx%3A%20http%3A%2F%2Fwww.sphinx-doc.org%2Fen%2Fmaster%2Fusage%2Finstallation.html%5Cnthen%3A%5Cn%60%60%60bash%5Cn%24%20cd%20docs%5Cn%24%20sphinx-build%20source%20build%5Cn%60%60%60%5Cnit%20will%20compile%20docs%20into%20build%20folder%2C%20you%20can%20run%20index.html%20inside%20that%20function.%5Cn%5Cn%23%23%20How%20to%20use%5CnIf%20you%20want%20to%20use%20the%20inline%20versions%20of%20functions%2C%20then%20include%20the%20main%20header%5Cn%60%60%60C%5Cn%23include%20%3Ccglm%2Fcglm.h%3E%5Cn%60%60%60%5Cnthe%20header%20will%20include%20all%20headers.%20Then%20call%20the%20func%20you%20want%20e.g.%20rotate%20vector%20by%20axis%3A%5Cn%60%60%60C%5Cnglm_vec3_rotate(v1%2C%20glm_rad(45)%2C%20(vec3)%7B1.0f%2C%200.0f%2C%200.0f%7D)%3B%5Cn%60%60%60%5Cnsome%20functions%20are%20overloaded%20%3A)%20e.g%20you%20can%20normalize%20vector%3A%5Cn%60%60%60C%5Cnglm_vec3_normalize(vec)%3B%5Cn%60%60%60%5Cnthis%20will%20normalize%20vec%20and%20store%20normalized%20vector%20into%20%60vec%60%20but%20if%20you%20will%20store%20normalized%20vector%20into%20another%20vector%20do%20this%3A%5Cn%60%60%60C%5Cnglm_vec3_normalize_to(vec%2C%20result)%3B%5Cn%60%60%60%5Cnlike%20this%20function%20you%20may%20see%20%60_to%60%20postfix%2C%20this%20functions%20store%20results%20to%20another%20variables%20and%20save%20temp%20memory%5Cn%5Cn%5Cnto%20call%20pre-compiled%20versions%20include%20header%20with%20%60c%60%20postfix%2C%20c%20means%20call.%20Pre-compiled%20versions%20are%20just%20wrappers.%5Cn%60%60%60C%5Cn%23include%20%3Ccglm%2Fcall.h%3E%5Cn%60%60%60%5Cnthis%20header%20will%20include%20all%20headers%20with%20c%20postfix.%20You%20need%20to%20call%20functions%20with%20c%20posfix%3A%5Cn%60%60%60C%5Cnglmc_vec3_normalize(vec)%3B%5Cn%60%60%60%5Cn%5CnFunction%20usage%20and%20parameters%20are%20documented%20inside%20related%20headers.%20You%20may%20see%20same%20parameter%20passed%20twice%20in%20some%20examples%20like%20this%3A%5Cn%60%60%60C%5Cnglm_mat4_mul(m1%2C%20m2%2C%20m1)%3B%5Cn%5Cn%2F*%20or%20*%2F%5Cnglm_mat4_mul(m1%2C%20m1%2C%20m1)%3B%5Cn%60%60%60%5Cnthe%20first%20two%20parameter%20are%20**%5Bin%5D**%20and%20the%20last%20one%20is%20**%5Bout%5D**%20parameter.%20After%20multiplying%20*m1*%20and%20*m2*%2C%20the%20result%20is%20stored%20in%20*m1*.%20This%20is%20why%20we%20send%20*m1*%20twice.%20You%20may%20store%20the%20result%20in%20a%20different%20matrix%2C%20this%20is%20just%20an%20example.%5Cn%5Cn%23%23%23%20Example%3A%20Computing%20MVP%20matrix%5Cn%5Cn%23%23%23%23%20Option%201%5Cn%60%60%60C%5Cnmat4%20proj%2C%20view%2C%20model%2C%20mvp%3B%5Cn%5Cn%2F*%20init%20proj%2C%20view%20and%20model%20...%20*%2F%5Cn%5Cnglm_mat4_mul(proj%2C%20view%2C%20viewProj)%3B%5Cnglm_mat4_mul(viewProj%2C%20model%2C%20mvp)%3B%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%20Option%202%5Cn%60%60%60C%5Cnmat4%20proj%2C%20view%2C%20model%2C%20mvp%3B%5Cn%5Cn%2F*%20init%20proj%2C%20view%20and%20model%20...%20*%2F%5Cn%5Cnglm_mat4_mulN((mat4%20*%5B%5D)%7B%26proj%2C%20%26view%2C%20%26model%7D%2C%203%2C%20mvp)%3B%5Cn%60%60%60%5Cn%5Cn%23%23%20How%20to%20send%20matrix%20to%20OpenGL%5Cn%5Cnmat4%20is%20array%20of%20vec4%20and%20vec4%20is%20array%20of%20floats.%20%60glUniformMatrix4fv%60%20functions%20accecpts%20%60float*%60%20as%20%60value%60%20(last%20param)%2C%20so%20you%20can%20cast%20mat4%20to%20float*%20or%20you%20can%20pass%20first%20column%20of%20matrix%20as%20beginning%20of%20memory%20of%20matrix%3A%5Cn%5CnOption%201%3A%20Send%20first%20column%5Cn%60%60%60C%5CnglUniformMatrix4fv(location%2C%201%2C%20GL_FALSE%2C%20matrix%5B0%5D)%3B%5Cn%5Cn%2F*%20array%20of%20matrices%20*%2F%5CnglUniformMatrix4fv(location%2C%201%2C%20GL_FALSE%2C%20matrix%5B0%5D%5B0%5D)%3B%5Cn%60%60%60%5Cn%5CnOption%202%3A%20Cast%20matrix%20to%20pointer%20type%20(also%20valid%20for%20multiple%20dimensional%20arrays)%5Cn%60%60%60C%5CnglUniformMatrix4fv(location%2C%201%2C%20GL_FALSE%2C%20(float%20*)matrix)%3B%5Cn%60%60%60%5Cn%5CnYou%20can%20pass%20matrices%20the%20same%20way%20to%20other%20APIs%20e.g.%20Vulkan%2C%20DX...%5Cn%5Cn%23%23%20Notes%5Cn%5Cn-%20This%20library%20does%20not%20support%20double%20type...%20yet%5Cn-%20If%20headers%20are%20not%20working%20properly%20with%20your%20compiler%2C%20IDE%20please%20open%20an%20issue%2C%20because%20I'm%20using%20GCC%20and%20clang%20to%20test%20it%20maybe%20sometimes%20MSVC%5Cn%5Cn**TODO%3A**%5Cn-%20%5B%20%5D%20Unit%20tests%20(In%20Progress)%5Cn-%20%5B%20%5D%20Unit%20tests%20for%20comparing%20cglm%20with%20glm%20results%5Cn-%20%5Bx%5D%20Add%20version%20info%5Cn-%20%5B%20%5D%20Unaligned%20operations%20(e.g.%20%60glm_umat4_mul%60)%5Cn-%20%5Bx%5D%20Extra%20documentation%5Cn-%20%5Bx%5D%20ARM%20Neon%20Arch%5Cn%5Cn%5Cn%23%23%20Contributors%5Cn%5CnThis%20project%20exists%20thanks%20to%20all%20the%20people%20who%20contribute.%20%5B%5BContribute%5D(CONTRIBUTING.md)%5D.%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fgithub.com%2Frecp%2Fcglm%2Fgraphs%2Fcontributors%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fcontributors.svg%3Fwidth%3D890%26button%3Dfalse%5C%22%20%2F%3E%3C%2Fa%3E%5Cn%5Cn%5Cn%23%23%20Backers%5Cn%5CnThank%20you%20to%20all%20our%20backers!%20%F0%9F%99%8F%20%5B%5BBecome%20a%20backer%5D(https%3A%2F%2Fopencollective.com%2Fcglm%23backer)%5D%5Cn%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%23backers%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fbackers.svg%3Fwidth%3D890%5C%22%3E%3C%2Fa%3E%5Cn%5Cn%5Cn%23%23%20Sponsors%5Cn%5CnSupport%20this%20project%20by%20becoming%20a%20sponsor.%20Your%20logo%20will%20show%20up%20here%20with%20a%20link%20to%20your%20website.%20%5B%5BBecome%20a%20sponsor%5D(https%3A%2F%2Fopencollective.com%2Fcglm%23sponsor)%5D%5Cn%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F0%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F0%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F1%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F1%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F2%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F2%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F3%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F3%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F4%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F4%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F5%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F5%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F6%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F6%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F7%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F7%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F8%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F8%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F9%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F9%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%5Cn%23%23%20License%5CnMIT.%20check%20the%20LICENSE%20file%5Cn%22%2C%22sha%22%3A%2217b7027c9d23b7eb2acd8170d77e7981eb5a124e%22%2C%22replace_content%22%3A%22%23%20%F0%9F%8E%A5%20OpenGL%20Mathematics%20(glm)%20for%20%60C%60%5Cn%5Cn%3Cp%20align%3D%5C%22center%5C%22%3E%5Cn%20%20%20%3Cimg%20alt%3D%5C%22%5C%22%20src%3D%5C%22https%3A%2F%2Fwww.gitlink.org.cn%2Fapi%2Fdnrops%2Fcglm%2Fraw%2Fcglm.png%3Fref%3Dmaster%5C%22%20width%3D%5C%22550%5C%22%20%2F%3E%5Cn%3C%2Fp%3E%5Cn%3Cbr%3E%5Cn%3Cp%20align%3D%5C%22center%5C%22%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22https%3A%2F%2Ftravis-ci.com%2Frecp%2Fcglm%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Ftravis-ci.com%2Frecp%2Fcglm.svg%3Fbranch%3Dmaster%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Build%20Status%5C%22%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22https%3A%2F%2Fci.appveyor.com%2Fproject%2Frecp%2Fcglm%2Fbranch%2Fmaster%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fci.appveyor.com%2Fapi%2Fprojects%2Fstatus%2Fav7l3gc0yhfex8y4%2Fbranch%2Fmaster%3Fsvg%3Dtrue%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Windows%20Build%20Status%5C%22%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22http%3A%2F%2Fcglm.readthedocs.io%2Fen%2Flatest%2F%3Fbadge%3Dlatest%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Freadthedocs.org%2Fprojects%2Fcglm%2Fbadge%2F%3Fversion%3Dlatest%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Documentation%20Status%5C%22%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22https%3A%2F%2Fwww.codacy.com%2Fapp%2Frecp%2Fcglm%3Futm_source%3Dgithub.com%26amp%3Butm_medium%3Dreferral%26amp%3Butm_content%3Drecp%2Fcglm%26amp%3Butm_campaign%3DBadge_Grade%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fapi.codacy.com%2Fproject%2Fbadge%2FGrade%2F6a62b37d5f214f178ebef269dc4a6bf1%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Codacy%20Badge%5C%22%2F%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22https%3A%2F%2Fcoveralls.io%2Fgithub%2Frecp%2Fcglm%3Fbranch%3Dmaster%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fcoveralls.io%2Frepos%2Fgithub%2Frecp%2Fcglm%2Fbadge.svg%3Fbranch%3Dmaster%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Coverage%20Status%5C%22%2F%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22https%3A%2F%2Fcodecov.io%2Fgh%2Frecp%2Fcglm%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fcodecov.io%2Fgh%2Frecp%2Fcglm%2Fbranch%2Fmaster%2Fgraph%2Fbadge.svg%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Coverage%20Status%5C%22%2F%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22%23sponsors%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsors%2Fbadge.svg%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Sponsors%20on%20Open%20Collective%5C%22%2F%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%20%20%20%20%3Ca%20href%3D%5C%22%23backers%5C%22%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fbackers%2Fbadge.svg%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%20alt%3D%5C%22Backers%20on%20Open%20Collective%5C%22%2F%3E%5Cn%20%20%20%20%3C%2Fa%3E%5Cn%3C%2Fp%3E%5Cn%5Cn%3Cbr%3E%5Cn%5Cn%3Cp%20align%3D%5C%22center%5C%22%3E%5CnHighly%20optimized%202D%7C3D%20math%20library%2C%20also%20known%20as%20%3Cb%3EOpenGL%20Mathematics%20(glm)%20for%20%60C%60%3C%2Fb%3E.%20%3Cb%3Ecglm%3C%2Fb%3E%20provides%20lot%20of%20utils%20to%20help%20math%20operations%20to%20be%20fast%20and%20quick%20to%20write.%20It%20is%20community%20friendly%2C%20feel%20free%20to%20bring%20any%20issues%2C%20bugs%20you%20faced.%20%5Cn%3C%2Fp%3E%5Cn%5Cn---%5Cn%5Cn%23%23%23%23%20%F0%9F%93%9A%20Documentation%5Cn%5CnAlmost%20all%20functions%20(inline%20versions)%20and%20parameters%20are%20documented%20inside%20the%20corresponding%20headers.%20%3Cbr%20%2F%3E%5CnComplete%20documentation%3A%20http%3A%2F%2Fcglm.readthedocs.io%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Note%20for%20previous%20versions%3A%5Cn%5Cn-%20_dup%20(duplicate)%20is%20changed%20to%20_copy.%20For%20instance%20%60glm_vec_dup%20-%3E%20glm_vec3_copy%60%5Cn-%20OpenGL%20related%20functions%20are%20dropped%20to%20make%20this%20lib%20platform%2Fthird-party%20independent%5Cn-%20make%20sure%20you%20have%20latest%20version%20and%20feel%20free%20to%20report%20bugs%2C%20troubles%5Cn-%20**%5Bbugfix%5D**%20euler%20angles%20was%20implemented%20in%20reverse%20order%20(extrinsic)%20it%20was%20fixed%2C%20now%20they%20are%20intrinsic.%20Make%20sure%20that%5Cnyou%20have%20the%20latest%20version%5Cn-%20**%5Bmajor%20change%5D**%20by%20starting%20v0.4.0%2C%20quaternions%20are%20stored%20as%20%5Bx%2C%20y%2C%20z%2C%20w%5D%2C%20it%20was%20%5Bw%2C%20x%2C%20y%2C%20z%5D%20in%20v0.3.5%20and%20earlier%20versions%5Cn-%20**%5Bapi%20rename%5D**%20by%20starting%20v0.4.5%2C%20**glm_simd**%20functions%20are%20renamed%20to%20**glmm_**%20%20%5Cn-%20**%5Bnew%20option%5D**%20by%20starting%20v0.4.5%2C%20you%20can%20disable%20alignment%20requirement%2C%20check%20options%20in%20docs.%20%20%5Cn-%20**%5Bmajor%20change%5D**%20by%20starting%20v0.5.0%2C%20vec3%20functions%20use%20**glm_vec3_**%20namespace%2C%20it%20was%20**glm_vec_**%20until%20v0.5.0%5Cn-%20**%5Bmajor%20change%5D**%20by%20starting%20v0.5.1%2C%20built-in%20alignment%20is%20removed%20from%20**vec3**%20and%20**mat3**%20types%5Cn-%20**%5Bmajor%20change%5D**%20by%20starting%20v0.7.3%2C%20inline%20print%20functions%20are%20disabled%20in%20release%2Fproduction%20mode%20to%20eliminate%20print%20costs%20(see%20options%20in%20documentation).%20Print%20output%20also%20improved.%20You%20can%20disable%20colors%20if%20you%20need%20%20(see%20documentation)%5Cn-%20**%5Bmajor%20change%5D**%20by%20starting%20v0.8.3%2C%20**cglm**%20supports%20alternative%20clipspace%20configuations%20e.g.%20Left%20Handed%2C%20Zero-to-One%20(_zo)...%20%60CGLM_FORCE_DEPTH_ZERO_TO_ONE%60%20and%20%60CGLM_FORCE_LEFT_HANDED%60%20is%20provided%20to%20control%20clipspace.%20You%20should%20be%20able%20to%20use%20**cglm**%20with%20Vulkan%2C%20DirectX%20and%20Metal%20now...%20see%20https%3A%2F%2Fcglm.readthedocs.io%2Fen%2Flatest%2Fopt.html%23clipspace-option-s%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Note%20for%20C%2B%2B%20developers%3A%5CnIf%20you%20are%20not%20aware%20of%20the%20original%20GLM%20library%20yet%2C%20you%20may%20also%20want%20to%20look%20at%3A%5Cnhttps%3A%2F%2Fgithub.com%2Fg-truc%2Fglm%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Note%20for%20new%20comers%20(Important)%3A%5Cn-%20%60vec4%60%20and%20%60mat4%60%20variables%20must%20be%20aligned.%20(There%20will%20be%20unaligned%20versions%20later)%5Cn-%20**in**%20and%20**%5Bin%2C%20out%5D**%20parameters%20must%20be%20initialized%20(please).%20But%20**%5Bout%5D**%20parameters%20not%2C%20initializing%20out%20param%20is%20%20also%20redundant%5Cn-%20All%20functions%20are%20inline%20if%20you%20don't%20want%20to%20use%20pre-compiled%20versions%20with%20glmc_%20prefix%2C%20you%20can%20ignore%20build%20process.%20Just%20include%20headers.%5Cn-%20if%20your%20debugger%20takes%20you%20to%20cglm%20headers%20then%20make%20sure%20you%20are%20not%20trying%20to%20copy%20vec4%20to%20vec3%20or%20alig%20issues...%5Cn-%20Welcome!%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Note%20for%20experienced%20developers%3A%5Cn-%20Since%20I'm%20testing%20this%20library%20in%20my%20projects%2C%20sometimes%20bugs%20occurs%3B%20finding%20that%20bug%5Bs%5D%20and%20making%20improvements%20would%20be%20more%20easy%20with%20multiple%20developer%2Fcontributor%20and%20their%20projects%20or%20knowledge.%20Consider%20to%20make%20some%20tests%20if%20you%20suspect%20something%20is%20wrong%20and%20any%20feedbacks%2C%20contributions%20and%20bug%20reports%20are%20always%20welcome.%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Allocations%3F%5Cn%60cglm%60%20doesn't%20alloc%20any%20memory%20on%20heap.%20So%20it%20doesn't%20provide%20any%20allocator.%20You%20should%20alloc%20memory%20for%20**out**%20parameters%20too%20if%20you%20pass%20pointer%20of%20memory%20location.%20Don't%20forget%20that%20**vec4**%20(also%20quat%2F**versor**)%20and%20**mat4**%20must%20be%20aligned%20(16-bytes)%2C%20because%20*cglm*%20uses%20SIMD%20instructions%20to%20optimize%20most%20operations%20if%20available.%5Cn%5Cn%23%23%23%23%20%F0%9F%93%8C%20Returning%20vector%20or%20matrix...%20%3F%5Cn%5Cn**cglm**%20supports%20both%20*ARRAY%20API*%20and%20*STRUCT%20API*%2C%20so%20you%20can%20return%20structs%20if%20you%20utilize%20struct%20api%20(%60glms_%60).%5Cn%5Cn%3Chr%2F%3E%5Cn%5Cn%3Ctable%3E%5Cn%20%20%3Ctbody%3E%5Cn%20%20%20%20%3Ctr%3E%5Cn%20%20%20%20%20%20%3Ctd%3E%5Cn%20%20%20%20%20%20%20%20%3Cdiv%3ELike%20some%20other%20graphics%20libraries%20(especially%20OpenGL)%20this%20library%20use%20Column-Major%20layout%20to%20keep%20matrices%20in%20the%20memory.%20%3C%2Fdiv%3E%5Cn%20%20%20%20%20%20%20%20%3Cdiv%3E%26nbsp%3B%3C%2Fdiv%3E%5Cn%20%20%20%20%20%20%20%20%3Cdiv%3EIn%20the%20future%20the%20library%20may%20support%20an%20option%20to%20use%20row-major%20layout%2C%20CURRENTLY%20if%20you%20need%20to%20row-major%20layout%20you%20will%20need%20to%20transpose%20it.%20%3C%2Fdiv%3E%5Cn%20%20%20%20%20%20%3C%2Ftd%3E%5Cn%20%20%20%20%20%20%3Ctd%3E%5Cn%20%20%20%20%20%20%20%20%3Cimg%20src%3D%5C%22https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F3%2F3f%2FMatrix_Columns.svg%5C%22%20width%3D%5C%22300px%5C%22%20%2F%3E%5Cn%20%20%20%20%20%20%3C%2Ftd%3E%5Cn%20%20%20%20%3C%2Ftr%3E%5Cn%20%20%3C%2Ftbody%3E%5Cn%3C%2Ftable%3E%5Cn%5Cn%23%23%20%F0%9F%9A%80%20Features%5Cn-%20**scalar**%20and%20**simd**%20(sse%2C%20avx%2C%20neon...)%20optimizations%5Cn-%20option%20to%20use%20different%20clipspaces%20e.g.%20Left%20Handed%2C%20Zero-to-One...%20(currrently%20right%20handed%20negative-one%20is%20default)%5Cn-%20array%20api%20and%20struct%20api%2C%20you%20can%20use%20arrays%20or%20structs.%5Cn-%20general%20purpose%20matrix%20operations%20(mat4%2C%20mat3)%5Cn-%20chain%20matrix%20multiplication%20(square%20only)%5Cn-%20general%20purpose%20vector%20operations%20(cross%2C%20dot%2C%20rotate%2C%20proj%2C%20angle...)%5Cn-%20affine%20transformations%5Cn-%20matrix%20decomposition%20(extract%20rotation%2C%20scaling%20factor)%5Cn-%20optimized%20affine%20transform%20matrices%20(mul%2C%20rigid-body%20inverse)%5Cn-%20camera%20(lookat)%5Cn-%20projections%20(ortho%2C%20perspective)%5Cn-%20quaternions%5Cn-%20euler%20angles%20%2F%20yaw-pitch-roll%20to%20matrix%5Cn-%20extract%20euler%20angles%5Cn-%20inline%20or%20pre-compiled%20function%20call%5Cn-%20frustum%20(extract%20view%20frustum%20planes%2C%20corners...)%5Cn-%20bounding%20box%20(AABB%20in%20Frustum%20(culling)%2C%20crop%2C%20merge...)%5Cn-%20bounding%20sphere%5Cn-%20project%2C%20unproject%5Cn-%20easing%20functions%5Cn-%20curves%5Cn-%20curve%20interpolation%20helpers%20(S*M*C%2C%20deCasteljau...)%5Cn-%20helpers%20to%20convert%20cglm%20types%20to%20Apple's%20simd%20library%20to%20pass%20cglm%20types%20to%20Metal%20GL%20without%20packing%20them%20on%20both%20sides%5Cn-%20ray%20intersection%20helpers%5Cn-%20and%20others...%5Cn%5Cn%3Chr%20%2F%3E%5Cn%5CnYou%20have%20two%20options%20to%20call%20a%20function%2Foperation%3A%20inline%20or%20library%20call%20(link)%5CnAlmost%20all%20functions%20are%20marked%20inline%20(always_inline)%20so%20compiler%20will%20probably%20inline.%5CnTo%20call%20pre-compiled%20versions%2C%20just%20use%20%60glmc_%60%20(c%20stands%20for%20'call')%20instead%20of%20%60glm_%60.%5Cn%5Cn%60%60%60C%5Cn%20%20%23include%20%3Ccglm%2Fcglm.h%3E%20%20%20%2F*%20for%20inline%20*%2F%5Cn%20%20%23include%20%3Ccglm%2Fcall.h%3E%20%20%20%2F*%20for%20library%20call%20(this%20also%20includes%20cglm.h)%20*%2F%5Cn%5Cn%20%20mat4%20rot%2C%20trans%2C%20rt%3B%5Cn%20%20%2F*%20...%20*%2F%5Cn%20%20glm_mul(trans%2C%20rot%2C%20rt)%3B%20%20%2F*%20inline%20*%2F%5Cn%20%20glmc_mul(trans%2C%20rot%2C%20rt)%3B%20%2F*%20call%20from%20library%20*%2F%5Cn%60%60%60%5CnMost%20of%20math%20functions%20are%20optimized%20manualy%20with%20SSE2%20if%20available%2C%20if%20not%3F%20Dont%20worry%20there%20are%20non-sse%20versions%20of%20all%20operations%5Cn%5CnYou%20can%20pass%20matrices%20and%20vectors%20as%20array%20to%20functions%20rather%20than%20get%20address.%5Cn%5Cn%60%60%60C%5Cn%20%20mat4%20m%20%3D%20%7B%5Cn%20%20%20%201%2C%200%2C%200%2C%200%2C%5Cn%20%20%20%200%2C%201%2C%200%2C%200%2C%5Cn%20%20%20%200%2C%200%2C%201%2C%200%2C%5Cn%20%20%20%200%2C%200%2C%200%2C%201%5Cn%20%20%7D%3B%5Cn%5Cn%20%20glm_translate(m%2C%20(vec3)%7B1.0f%2C%200.0f%2C%200.0f%7D)%3B%5Cn%60%60%60%5Cn%5CnLibrary%20contains%20general%20purpose%20mat4%20mul%20and%20inverse%20functions%2C%20and%20also%20contains%20some%20special%20forms%20(optimized)%20of%20these%20functions%20for%20affine%20transformations'%20matrices.%20If%20you%20want%20to%20multiply%20two%20affine%20transformation%20matrices%20you%20can%20use%20glm_mul%20instead%20of%20glm_mat4_mul%20and%20glm_inv_tr%20(ROT%20%2B%20TR)%20instead%20glm_mat4_inv%5Cn%60%60%60C%5Cn%2F*%20multiplication%20*%2F%5Cnmat4%20modelMat%3B%5Cnglm_mul(T%2C%20R%2C%20modelMat)%3B%5Cn%5Cn%2F*%20othonormal%20rot%20%2B%20tr%20matrix%20inverse%20(rigid-body)%20*%2F%5Cnglm_inv_tr(modelMat)%3B%5Cn%60%60%60%5Cn%5Cn%23%23%23%20Struct%20API%5Cn%5CnThe%20struct%20API%20works%20as%20follows%2C%20note%20the%20%60s%60%20suffix%20on%20types%2C%20the%20%60glms_%60%20prefix%20on%20functions%20and%20the%20%60GLMS_%60%20prefix%20on%20constants%3A%5Cn%5Cn%60%60%60C%5Cn%23include%20%3Ccglm%2Fstruct.h%3E%5Cn%5Cnmat4s%20mat%20%3D%20GLMS_MAT4_IDENTITY_INIT%3B%5Cnmat4s%20inv%20%3D%20glms_mat4_inv(mat)%3B%5Cn%60%60%60%5Cn%5CnStruct%20functions%20generally%20take%20their%20parameters%20as%20*values*%20and%20*return*%20their%20results%2C%20rather%20than%20taking%20pointers%20and%20writing%20to%20out%20parameters.%20That%20means%20your%20parameters%20can%20usually%20be%20%60const%60%2C%20if%20you're%20into%20that.%5Cn%5CnThe%20types%20used%20are%20actually%20unions%20that%20allow%20access%20to%20the%20same%20data%20multiple%20ways.%20One%20of%20those%20ways%20involves%20anonymous%20structures%2C%20available%20since%20C11.%20MSVC%20also%20supports%20it%20for%20earlier%20C%20versions%20out%20of%20the%20box%20and%20GCC%2FClang%20do%20if%20you%20enable%20%60-fms-extensions%60.%20To%20explicitly%20enable%20these%20anonymous%20structures%2C%20%60%23define%20CGLM_USE_ANONYMOUS_STRUCT%60%20to%20%601%60%2C%20to%20disable%20them%2C%20to%20%600%60.%20For%20backward%20compatibility%2C%20you%20can%20also%20%60%23define%20CGLM_NO_ANONYMOUS_STRUCT%60%20(value%20is%20irrelevant)%20to%20disable%20them.%20If%20you%20don't%20specify%20explicitly%2C%20cglm%20will%20do%20a%20best%20guess%20based%20on%20your%20compiler%20and%20the%20C%20version%20you're%20using.%5Cn%5Cn%23%23%20%F0%9F%94%A8%20Build%5Cn%5Cn%23%23%23%20CMake%20(All%20platforms)%5Cn%60%60%60bash%5Cn%24%20mkdir%20build%5Cn%24%20cd%20build%5Cn%24%20cmake%20..%20%23%20%5BOptional%5D%20-DCGLM_SHARED%3DON%5Cn%24%20make%5Cn%24%20sudo%20make%20install%20%23%20%5BOptional%5D%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%23%20Cmake%20options%20with%20Defaults%3A%5Cn%5Cn%60%60%60CMake%5Cnoption(CGLM_SHARED%20%5C%22Shared%20build%5C%22%20ON)%5Cnoption(CGLM_STATIC%20%5C%22Static%20build%5C%22%20OFF)%5Cnoption(CGLM_USE_C99%20%5C%22%5C%22%20OFF)%20%23%C2%A0C11%20%5Cnoption(CGLM_USE_TEST%20%5C%22Enable%20Tests%5C%22%20OFF)%20%23%C2%A0for%20make%20check%20-%20make%20test%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%20Use%20as%20header-only%20library%20with%20your%20CMake%20project%5Cn%5CnThis%20requires%20no%20building%20or%20installation%20of%20cglm.%5Cn%5Cn*%20Example%3A%5Cn%5Cn%60%60%60%20cmake%5Cncmake_minimum_required(VERSION%203.8.2)%5Cn%5Cnproject(%3CYour%20Project%20Name%3E)%5Cn%5Cnadd_executable(%24%7BPROJECT_NAME%7D%20src%2Fmain.c)%5Cntarget_link_libraries(%24%7BLIBRARY_NAME%7D%20PRIVATE%5Cn%20%20cglm_headers)%5Cn%5Cnadd_subdirectory(external%2Fcglm%2F%20EXCLUDE_FROM_ALL)%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%20Use%20with%20your%20CMake%20project%5Cn*%20Example%3A%5Cn%60%60%60cmake%5Cncmake_minimum_required(VERSION%203.8.2)%5Cn%5Cnproject(%3CYour%20Project%20Name%3E)%5Cn%5Cnadd_executable(%24%7BPROJECT_NAME%7D%20src%2Fmain.c)%5Cntarget_link_libraries(%24%7BLIBRARY_NAME%7D%20PRIVATE%5Cn%20%20cglm)%5Cn%5Cnadd_subdirectory(external%2Fcglm%2F)%5Cn%5Cn%23%20or%20you%20can%20use%20find_package%20to%20configure%20cglm%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%20Use%20CMake%20to%20build%20for%20WebAssembly%5Cn%5CnSince%20math%20functions%20like%20%60sinf%60%20is%20used%2C%20this%20can%20not%20be%20targeted%20at%20%60wasm32-unknown-unknown%60%2C%20one%20of%20%5Bwasi-sdk%5D(https%3A%2F%2Fgithub.com%2FWebAssembly%2Fwasi-sdk)%20or%20%5Bemscripten%5D(https%3A%2F%2Fgithub.com%2Femscripten-core%2Femsdk)%20should%20be%20used.%5Cn%5CnShould%20note%20that%20shared%20build%20is%20not%20yet%20supported%20for%20WebAssembly.%5Cn%5CnFor%20%5Bsimd128%5D(https%3A%2F%2Fgithub.com%2FWebAssembly%2Fsimd)%20support%2C%20add%20%60-msimd128%60%20to%20%60CMAKE_C_FLAGS%60%2C%20in%20command%20line%20%60-DCMAKE_C_FLAGS%3D%5C%22-msimd128%5C%22%60.%5Cn%5CnFor%20tests%2C%20the%20cmake%20option%20%60CGLM_USE_TEST%60%20would%20still%20work%2C%20you'll%20need%20a%20wasi%20runtime%20for%20running%20tests%2C%20see%20our%20%5Bci%20config%20file%5D(%2F%2Fdnrops%2Fcglm%2Ftree%2Fmaster%2F.github%2Fworkflows%2Fcmake-wasm.yml)%20for%20a%20detailed%20example.%5Cn%5Cn%23%23%23%23%23%20Use%20CMake%20and%20WASI%20SDK%20to%20build%20for%20WebAssembly%5Cn%5Cn%60%60%60bash%5Cn%24%20cmake%20..%20%5C%5C%5Cn%20%20-DCMAKE_TOOLCHAIN_FILE%3D%2Fpath%2Fto%2Fwasi-sdk-19.0%2Fshare%2Fcmake%2Fwasi-sdk.cmake%20%5C%5C%5Cn%20%20-DWASI_SDK_PREFIX%3D%2Fpath%2Fto%2Fwasi-sdk-19.0%5Cn%60%60%60%5Cn%5CnWhere%20%60%2Fpath%2Fto%2Fwasi-sdk-19.0%2F%60%20is%20the%20path%20to%20extracted%20%5Bwasi%20sdk%5D(https%3A%2F%2Fgithub.com%2FWebAssembly%2Fwasi-sdk).%5Cn%5CnIn%20this%20case%20it%20would%20by%20default%20make%20a%20static%20build.%5Cn%5Cn%23%23%23%23%23%20Use%20CMake%20and%20Emscripten%20SDK%20to%20build%20for%20WebAssembly%5Cn%5Cn%60%60%60bash%5Cn%24%20emcmake%20cmake%20..%20%5C%5C%5Cn%20%20-DCMAKE_EXE_LINKER_FLAGS%3D%5C%22-s%20STANDALONE_WASM%5C%22%20%5C%5C%5Cn%20%20-DCGLM_STATIC%3DON%5Cn%60%60%60%5Cn%5CnThe%20%60emcmake%60%20here%20is%20the%20cmake%20wrapper%20for%20Emscripten%20from%20installed%20%5Bemsdk%5D(https%3A%2F%2Fgithub.com%2Femscripten-core%2Femsdk).%5Cn%5Cn%23%23%23%20Meson%20(All%20platforms)%5Cn%5Cn%60%60%60bash%5Cn%24%20meson%20build%20%23%20%5BOptional%5D%20--default-library%3Dstatic%5Cn%24%20cd%20build%5Cn%24%20ninja%5Cn%24%20sudo%20ninja%20install%20%23%20%5BOptional%5D%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%23%20Meson%20options%20with%20Defaults%3A%5Cn%5Cn%60%60%60meson%5Cnc_std%3Dc11%5Cnbuildtype%3Drelease%5Cndefault_library%3Dshared%5Cnbuild_tests%3Dtrue%20%23%C2%A0to%20run%20tests%3A%20ninja%20test%5Cn%60%60%60%5Cn%23%23%23%23%20Use%20with%20your%20Meson%20project%5Cn*%20Example%3A%5Cn%60%60%60meson%5Cn%23%20Clone%20cglm%20or%20create%20a%20cglm.wrap%20under%20%3Csource_root%3E%2Fsubprojects%5Cnproject('name'%2C%20'c')%5Cn%5Cncglm_dep%20%3D%20dependency('cglm'%2C%20fallback%20%3A%20'cglm'%2C%20'cglm_dep')%5Cn%5Cnexecutable('exe'%2C%20'src%2Fmain.c'%2C%20dependencies%20%3A%20cglm_dep)%5Cn%60%60%60%5Cn%5Cn%23%23%23%20Swift%20(Swift%20Package%20Manager)%5Cn%5CnCurrently%20only%20default%20build%20options%20are%20supported.%20Add%20**cglm**%20dependency%20to%20your%20project%3A%5Cn%5Cn%60%60%60swift%5Cn...%5CnPackage(%20%5Cn%20%20...%5Cn%20%20dependencies%3A%20%5B%5Cn%20%20%20%20...%5Cn%20%20%20%20.package(url%3A%20%5C%22https%3A%2F%2Fgithub.com%2Frecp%2Fcglm%5C%22%2C%20.branch(%5C%22master%5C%22))%2C%5Cn%20%20%5D%5Cn%20%20...%5Cn)%5Cn%60%60%60%5Cn%5CnNow%20add%20**cgml**%20as%20a%20dependency%20to%20your%20target.%20Product%20choices%20are%3A%5Cn-%20**cglm**%20for%20inlined%20version%20of%20the%20library%20which%20can%20be%20linked%20only%20statically%5Cn-%20**cglmc**%20for%20a%20compiled%20version%20of%20the%20library%20with%20no%20linking%20limitation%5Cn%5Cn%60%60%60swift%5Cn...%5Cn.target(%5Cn%20%20...%5Cn%20%20dependencies%3A%20%5B%5Cn%20%20%20%20...%5Cn%20%20%20%20.product(name%3A%20%5C%22cglm%5C%22%2C%20package%3A%20%5C%22cglm%5C%22)%2C%5Cn%20%20%5D%5Cn%20%20...%5Cn)%5Cn...%5Cn%60%60%60%5Cn%5Cn%23%23%23%20Unix%20(Autotools)%5Cn%5Cn%60%60%60bash%5Cn%24%20sh%20autogen.sh%5Cn%24%20.%2Fconfigure%5Cn%24%20make%5Cn%24%20make%20check%20%23%20%5BOptional%5D%5Cn%24%20%5Bsudo%5D%20make%20install%20%23%20%5BOptional%5D%5Cn%60%60%60%5Cn%5CnThis%20will%20also%20install%20pkg-config%20files%20so%20you%20can%20use%5Cn%60pkg-config%20--cflags%20cglm%60%20and%20%60pkg-config%20--libs%20cglm%60%20to%20retrieve%20compiler%5Cnand%20linker%20flags.%5Cn%5CnThe%20files%20will%20be%20installed%20into%20the%20given%20prefix%20(usually%20%60%2Fusr%2Flocal%60%20by%5Cndefault%20on%20Linux)%2C%20but%20your%20pkg-config%20may%20not%20be%20configured%20to%20actually%20check%5Cnthere.%20You%20can%20figure%20out%20where%20it's%20looking%20by%20running%20%60pkg-config%20--variable%5Cnpc_path%20pkg-config%60%20and%20change%20the%20path%20the%20files%20are%20installed%20to%20via%5Cn%60.%2Fconfigure%20--with-pkgconfigdir%3D%2Fyour%2Fpath%60.%20Alternatively%2C%20you%20can%20add%20the%5Cnprefix%20path%20to%20your%20%60PKG_CONFIG_PATH%60%20environment%20variable.%5Cn%5Cn%23%23%23%20Windows%20(MSBuild)%5CnWindows%20related%20build%20file%20and%20project%20files%20are%20located%20in%20%60win%60%20folder%2C%5Cnmake%20sure%20you%20are%20inside%20%60cglm%2Fwin%60%20folder.%5CnCode%20Analysis%20is%20enabled%2C%20so%20it%20may%20take%20awhile%20to%20build.%5Cn%5Cn%60%60%60Powershell%5Cn%24%20cd%20win%5Cn%24%20.%5C%5Cbuild.bat%5Cn%60%60%60%5Cnif%20%60msbuild%60%20won't%20work%20(because%20of%20multi%20version%20VS)%20then%20try%20to%20build%20with%20%60devenv%60%3A%5Cn%60%60%60Powershell%5Cn%24%20devenv%20cglm.sln%20%2FBuild%20Release%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%20Running%20Tests%20on%20Windows%5Cn%5CnYou%20can%20see%20test%20project%20in%20same%20visual%20studio%20solution%20file.%20It%20is%20enough%20to%20run%20that%20project%20to%20run%20tests.%5Cn%5Cn%23%23%23%20Building%20Docs%5CnFirst%20you%20need%20install%20Sphinx%3A%20http%3A%2F%2Fwww.sphinx-doc.org%2Fen%2Fmaster%2Fusage%2Finstallation.html%5Cnthen%3A%5Cn%60%60%60bash%5Cn%24%20cd%20docs%5Cn%24%20sphinx-build%20source%20build%5Cn%60%60%60%5Cnit%20will%20compile%20docs%20into%20build%20folder%2C%20you%20can%20run%20index.html%20inside%20that%20function.%5Cn%5Cn%23%23%20How%20to%20use%5CnIf%20you%20want%20to%20use%20the%20inline%20versions%20of%20functions%2C%20then%20include%20the%20main%20header%5Cn%60%60%60C%5Cn%23include%20%3Ccglm%2Fcglm.h%3E%5Cn%60%60%60%5Cnthe%20header%20will%20include%20all%20headers.%20Then%20call%20the%20func%20you%20want%20e.g.%20rotate%20vector%20by%20axis%3A%5Cn%60%60%60C%5Cnglm_vec3_rotate(v1%2C%20glm_rad(45)%2C%20(vec3)%7B1.0f%2C%200.0f%2C%200.0f%7D)%3B%5Cn%60%60%60%5Cnsome%20functions%20are%20overloaded%20%3A)%20e.g%20you%20can%20normalize%20vector%3A%5Cn%60%60%60C%5Cnglm_vec3_normalize(vec)%3B%5Cn%60%60%60%5Cnthis%20will%20normalize%20vec%20and%20store%20normalized%20vector%20into%20%60vec%60%20but%20if%20you%20will%20store%20normalized%20vector%20into%20another%20vector%20do%20this%3A%5Cn%60%60%60C%5Cnglm_vec3_normalize_to(vec%2C%20result)%3B%5Cn%60%60%60%5Cnlike%20this%20function%20you%20may%20see%20%60_to%60%20postfix%2C%20this%20functions%20store%20results%20to%20another%20variables%20and%20save%20temp%20memory%5Cn%5Cn%5Cnto%20call%20pre-compiled%20versions%20include%20header%20with%20%60c%60%20postfix%2C%20c%20means%20call.%20Pre-compiled%20versions%20are%20just%20wrappers.%5Cn%60%60%60C%5Cn%23include%20%3Ccglm%2Fcall.h%3E%5Cn%60%60%60%5Cnthis%20header%20will%20include%20all%20headers%20with%20c%20postfix.%20You%20need%20to%20call%20functions%20with%20c%20posfix%3A%5Cn%60%60%60C%5Cnglmc_vec3_normalize(vec)%3B%5Cn%60%60%60%5Cn%5CnFunction%20usage%20and%20parameters%20are%20documented%20inside%20related%20headers.%20You%20may%20see%20same%20parameter%20passed%20twice%20in%20some%20examples%20like%20this%3A%5Cn%60%60%60C%5Cnglm_mat4_mul(m1%2C%20m2%2C%20m1)%3B%5Cn%5Cn%2F*%20or%20*%2F%5Cnglm_mat4_mul(m1%2C%20m1%2C%20m1)%3B%5Cn%60%60%60%5Cnthe%20first%20two%20parameter%20are%20**%5Bin%5D**%20and%20the%20last%20one%20is%20**%5Bout%5D**%20parameter.%20After%20multiplying%20*m1*%20and%20*m2*%2C%20the%20result%20is%20stored%20in%20*m1*.%20This%20is%20why%20we%20send%20*m1*%20twice.%20You%20may%20store%20the%20result%20in%20a%20different%20matrix%2C%20this%20is%20just%20an%20example.%5Cn%5Cn%23%23%23%20Example%3A%20Computing%20MVP%20matrix%5Cn%5Cn%23%23%23%23%20Option%201%5Cn%60%60%60C%5Cnmat4%20proj%2C%20view%2C%20model%2C%20mvp%3B%5Cn%5Cn%2F*%20init%20proj%2C%20view%20and%20model%20...%20*%2F%5Cn%5Cnglm_mat4_mul(proj%2C%20view%2C%20viewProj)%3B%5Cnglm_mat4_mul(viewProj%2C%20model%2C%20mvp)%3B%5Cn%60%60%60%5Cn%5Cn%23%23%23%23%20Option%202%5Cn%60%60%60C%5Cnmat4%20proj%2C%20view%2C%20model%2C%20mvp%3B%5Cn%5Cn%2F*%20init%20proj%2C%20view%20and%20model%20...%20*%2F%5Cn%5Cnglm_mat4_mulN((mat4%20*%5B%5D)%7B%26proj%2C%20%26view%2C%20%26model%7D%2C%203%2C%20mvp)%3B%5Cn%60%60%60%5Cn%5Cn%23%23%20How%20to%20send%20matrix%20to%20OpenGL%5Cn%5Cnmat4%20is%20array%20of%20vec4%20and%20vec4%20is%20array%20of%20floats.%20%60glUniformMatrix4fv%60%20functions%20accecpts%20%60float*%60%20as%20%60value%60%20(last%20param)%2C%20so%20you%20can%20cast%20mat4%20to%20float*%20or%20you%20can%20pass%20first%20column%20of%20matrix%20as%20beginning%20of%20memory%20of%20matrix%3A%5Cn%5CnOption%201%3A%20Send%20first%20column%5Cn%60%60%60C%5CnglUniformMatrix4fv(location%2C%201%2C%20GL_FALSE%2C%20matrix%5B0%5D)%3B%5Cn%5Cn%2F*%20array%20of%20matrices%20*%2F%5CnglUniformMatrix4fv(location%2C%201%2C%20GL_FALSE%2C%20matrix%5B0%5D%5B0%5D)%3B%5Cn%60%60%60%5Cn%5CnOption%202%3A%20Cast%20matrix%20to%20pointer%20type%20(also%20valid%20for%20multiple%20dimensional%20arrays)%5Cn%60%60%60C%5CnglUniformMatrix4fv(location%2C%201%2C%20GL_FALSE%2C%20(float%20*)matrix)%3B%5Cn%60%60%60%5Cn%5CnYou%20can%20pass%20matrices%20the%20same%20way%20to%20other%20APIs%20e.g.%20Vulkan%2C%20DX...%5Cn%5Cn%23%23%20Notes%5Cn%5Cn-%20This%20library%20does%20not%20support%20double%20type...%20yet%5Cn-%20If%20headers%20are%20not%20working%20properly%20with%20your%20compiler%2C%20IDE%20please%20open%20an%20issue%2C%20because%20I'm%20using%20GCC%20and%20clang%20to%20test%20it%20maybe%20sometimes%20MSVC%5Cn%5Cn**TODO%3A**%5Cn-%20%5B%20%5D%20Unit%20tests%20(In%20Progress)%5Cn-%20%5B%20%5D%20Unit%20tests%20for%20comparing%20cglm%20with%20glm%20results%5Cn-%20%5Bx%5D%20Add%20version%20info%5Cn-%20%5B%20%5D%20Unaligned%20operations%20(e.g.%20%60glm_umat4_mul%60)%5Cn-%20%5Bx%5D%20Extra%20documentation%5Cn-%20%5Bx%5D%20ARM%20Neon%20Arch%5Cn%5Cn%5Cn%23%23%20Contributors%5Cn%5CnThis%20project%20exists%20thanks%20to%20all%20the%20people%20who%20contribute.%20%5B%5BContribute%5D(%2F%2Fdnrops%2Fcglm%2Ftree%2Fmaster%2FCONTRIBUTING.md)%5D.%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fgithub.com%2Frecp%2Fcglm%2Fgraphs%2Fcontributors%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fcontributors.svg%3Fwidth%3D890%26button%3Dfalse%5C%22%20%2F%3E%3C%2Fa%3E%5Cn%5Cn%5Cn%23%23%20Backers%5Cn%5CnThank%20you%20to%20all%20our%20backers!%20%F0%9F%99%8F%20%5B%5BBecome%20a%20backer%5D(https%3A%2F%2Fopencollective.com%2Fcglm%23backer)%5D%5Cn%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%23backers%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fbackers.svg%3Fwidth%3D890%5C%22%3E%3C%2Fa%3E%5Cn%5Cn%5Cn%23%23%20Sponsors%5Cn%5CnSupport%20this%20project%20by%20becoming%20a%20sponsor.%20Your%20logo%20will%20show%20up%20here%20with%20a%20link%20to%20your%20website.%20%5B%5BBecome%20a%20sponsor%5D(https%3A%2F%2Fopencollective.com%2Fcglm%23sponsor)%5D%5Cn%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F0%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F0%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F1%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F1%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F2%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F2%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F3%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F3%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F4%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F4%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F5%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F5%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F6%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F6%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F7%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F7%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F8%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F8%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%3Ca%20href%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F9%2Fwebsite%5C%22%20target%3D%5C%22_blank%5C%22%3E%3Cimg%20src%3D%5C%22https%3A%2F%2Fopencollective.com%2Fcglm%2Fsponsor%2F9%2Favatar.svg%5C%22%3E%3C%2Fa%3E%5Cn%5Cn%23%23%20License%5CnMIT.%20check%20the%20LICENSE%20file%5Cn%22%7D"},"zoneReducer":{"zoneDetail":"","newsDetail":""}}
🎥 OpenGL Mathematics (glm) for
C
Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C`. cglm provides lot of utils to help math operations to be fast and quick to write. It is community friendly, feel free to bring any issues, bugs you faced.
📚 Documentation
Almost all functions (inline versions) and parameters are documented inside the corresponding headers.
Complete documentation: http://cglm.readthedocs.io
📌 Note for previous versions:
glm_vec_dup -> glm_vec3_copy
CGLM_FORCE_DEPTH_ZERO_TO_ONE
andCGLM_FORCE_LEFT_HANDED
is provided to control clipspace. You should be able to use cglm with Vulkan, DirectX and Metal now… see https://cglm.readthedocs.io/en/latest/opt.html#clipspace-option-s📌 Note for C++ developers:
If you are not aware of the original GLM library yet, you may also want to look at: https://github.com/g-truc/glm
📌 Note for new comers (Important):
vec4
andmat4
variables must be aligned. (There will be unaligned versions later)📌 Note for experienced developers:
📌 Allocations?
cglm
doesn’t alloc any memory on heap. So it doesn’t provide any allocator. You should alloc memory for out parameters too if you pass pointer of memory location. Don’t forget that vec4 (also quat/versor) and mat4 must be aligned (16-bytes), because cglm uses SIMD instructions to optimize most operations if available.📌 Returning vector or matrix… ?
cglm supports both ARRAY API and STRUCT API, so you can return structs if you utilize struct api (
glms_
).🚀 Features
You have two options to call a function/operation: inline or library call (link) Almost all functions are marked inline (always_inline) so compiler will probably inline. To call pre-compiled versions, just use
glmc_
(c stands for ‘call’) instead ofglm_
.Most of math functions are optimized manualy with SSE2 if available, if not? Dont worry there are non-sse versions of all operations
You can pass matrices and vectors as array to functions rather than get address.
Library contains general purpose mat4 mul and inverse functions, and also contains some special forms (optimized) of these functions for affine transformations’ matrices. If you want to multiply two affine transformation matrices you can use glm_mul instead of glm_mat4_mul and glm_inv_tr (ROT + TR) instead glm_mat4_inv
Struct API
The struct API works as follows, note the
s
suffix on types, theglms_
prefix on functions and theGLMS_
prefix on constants:Struct functions generally take their parameters as values and return their results, rather than taking pointers and writing to out parameters. That means your parameters can usually be
const
, if you’re into that.The types used are actually unions that allow access to the same data multiple ways. One of those ways involves anonymous structures, available since C11. MSVC also supports it for earlier C versions out of the box and GCC/Clang do if you enable
-fms-extensions
. To explicitly enable these anonymous structures,#define CGLM_USE_ANONYMOUS_STRUCT
to1
, to disable them, to0
. For backward compatibility, you can also#define CGLM_NO_ANONYMOUS_STRUCT
(value is irrelevant) to disable them. If you don’t specify explicitly, cglm will do a best guess based on your compiler and the C version you’re using.🔨 Build
CMake (All platforms)
Cmake options with Defaults:
Use as header-only library with your CMake project
This requires no building or installation of cglm.
Use with your CMake project
project()
add_executable(${PROJECT_NAME} src/main.c) target_link_libraries(${LIBRARY_NAME} PRIVATE cglm)
add_subdirectory(external/cglm/)
or you can use find_package to configure cglm
Where
/path/to/wasi-sdk-19.0/
is the path to extracted wasi sdk.In this case it would by default make a static build.
Use CMake and Emscripten SDK to build for WebAssembly
The
emcmake
here is the cmake wrapper for Emscripten from installed emsdk.Meson (All platforms)
Meson options with Defaults:
Use with your Meson project
Clone cglm or create a cglm.wrap under/subprojects
project(‘name’, ‘c’)cglm_dep = dependency(‘cglm’, fallback : ‘cglm’, ‘cglm_dep’)
executable(‘exe’, ‘src/main.c’, dependencies : cglm_dep)
Now add cgml as a dependency to your target. Product choices are:
Unix (Autotools)
This will also install pkg-config files so you can use
pkg-config --cflags cglm
andpkg-config --libs cglm
to retrieve compiler and linker flags.The files will be installed into the given prefix (usually
/usr/local
by default on Linux), but your pkg-config may not be configured to actually check there. You can figure out where it’s looking by runningpkg-config --variable pc_path pkg-config
and change the path the files are installed to via./configure --with-pkgconfigdir=/your/path
. Alternatively, you can add the prefix path to yourPKG_CONFIG_PATH
environment variable.Windows (MSBuild)
Windows related build file and project files are located in
win
folder, make sure you are insidecglm/win
folder. Code Analysis is enabled, so it may take awhile to build.if
msbuild
won’t work (because of multi version VS) then try to build withdevenv
:Running Tests on Windows
You can see test project in same visual studio solution file. It is enough to run that project to run tests.
Building Docs
First you need install Sphinx: http://www.sphinx-doc.org/en/master/usage/installation.html then:
it will compile docs into build folder, you can run index.html inside that function.
How to use
If you want to use the inline versions of functions, then include the main header
the header will include all headers. Then call the func you want e.g. rotate vector by axis:
some functions are overloaded :) e.g you can normalize vector:
this will normalize vec and store normalized vector into
vec
but if you will store normalized vector into another vector do this:like this function you may see
_to
postfix, this functions store results to another variables and save temp memoryto call pre-compiled versions include header with
c
postfix, c means call. Pre-compiled versions are just wrappers.this header will include all headers with c postfix. You need to call functions with c posfix:
Function usage and parameters are documented inside related headers. You may see same parameter passed twice in some examples like this:
the first two parameter are [in] and the last one is [out] parameter. After multiplying m1 and m2, the result is stored in m1. This is why we send m1 twice. You may store the result in a different matrix, this is just an example.
Example: Computing MVP matrix
Option 1
Option 2
How to send matrix to OpenGL
mat4 is array of vec4 and vec4 is array of floats.
glUniformMatrix4fv
functions accecptsfloat*
asvalue
(last param), so you can cast mat4 to float* or you can pass first column of matrix as beginning of memory of matrix:Option 1: Send first column
Option 2: Cast matrix to pointer type (also valid for multiple dimensional arrays)
You can pass matrices the same way to other APIs e.g. Vulkan, DX…
Notes
TODO:
glm_umat4_mul
)Contributors
This project exists thanks to all the people who contribute. [Contribute].
Backers
Thank you to all our backers! 🙏 [Become a backer]
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
License
MIT. check the LICENSE file