{"id":28713412,"url":"https://github.com/engoengine/glm","last_synced_at":"2025-06-15T00:10:18.925Z","repository":{"id":54314709,"uuid":"59864094","full_name":"EngoEngine/glm","owner":"EngoEngine","description":"memory friendly, faster version of mathgl32 by go-gl and uses lux native float32 math lib","archived":false,"fork":false,"pushed_at":"2021-02-24T17:23:31.000Z","size":283,"stargazers_count":9,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-20T03:52:12.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EngoEngine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-27T21:26:26.000Z","updated_at":"2023-01-24T15:44:15.000Z","dependencies_parsed_at":"2022-08-13T11:50:21.614Z","dependency_job_id":null,"html_url":"https://github.com/EngoEngine/glm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EngoEngine/glm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngoEngine%2Fglm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngoEngine%2Fglm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngoEngine%2Fglm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngoEngine%2Fglm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EngoEngine","download_url":"https://codeload.github.com/EngoEngine/glm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngoEngine%2Fglm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259901390,"owners_count":22929227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-15T00:10:17.836Z","updated_at":"2025-06-15T00:10:18.915Z","avatar_url":"https://github.com/EngoEngine.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glm [![Build Status](http://lionheart.hydroflame.net:8080/job/glm/lastSuccessfulBuild/artifact/status.svg)](http://lionheart.hydroflame.net:8080/job/glm/) [![Tests](http://lionheart.hydroflame.net:8080/job/glm/lastSuccessfulBuild/artifact/tests.svg)](http://lionheart.hydroflame.net:8080/job/glm/) [![Coverage](http://lionheart.hydroflame.net:8080/job/glm/lastSuccessfulBuild/artifact/cover.svg)](http://lionheart.hydroflame.net:8080/job/glm/) [![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/engoengine/glm)\n\nVENDOR THIS IF YOU'RE USING IT. The API is not quite stable yet. Specialy geo*.\n\nMore efficient version then go-gl math lib and better name (mgl32 is too long to type).\n\nThe problem with go-gl implementation is that every operation returns a new matrix/quaternion/vector, you can't reuse memory. Benchmark reflect that this causes quite the slowdown. see [issue 29](https://github.com/go-gl/mathgl/issues/29). This library is a fork of mgl32 but a ton of methods we're added in order to allow the user to have more control over the memory. First, most methods take pointer argument and second there is more then 1 method to do the same operation.\n\nThis library uses lux math (native float32 math) instead of the standard library math.\n\nIn the future, when we have more knowledge of plan9 we intend to insert some SIMD operations for the more hardcore stuff.\n```Go\nfunc (m1 *Mat2) Add(m2 *Mat2) *Mat2 {\n\treturn \u0026Mat2{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3]}\n}\n\nfunc (m1 *Mat2) SumOf(m2, m3 *Mat2) *Mat2 {\n\tm1[0] = m2[0] + m3[0]\n\tm1[1] = m2[1] + m3[1]\n\tm1[2] = m2[2] + m3[2]\n\tm1[3] = m2[3] + m3[3]\n\treturn m1\n}\n\nfunc (m1 *Mat2) SumWith(m2 *Mat2) *Mat2 {\n\tm1[0] += m2[0]\n\tm1[1] += m2[1]\n\tm1[2] += m2[2]\n\tm1[3] += m2[3]\n\treturn m1\n}\n```\n\n`nameofop` takes the 2 elements and does `op` with them, storing the result in a new element. `x1 := x2 op x3`\n`nameofopOf` takes 3 argument, does the operation on the last 2 and stores the result in the first `x1 = x2 op x3`\n`nameofopWith` takes 2 element, does `op` with them and stores the results in the first. `x1 = x1 op x2`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengoengine%2Fglm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengoengine%2Fglm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengoengine%2Fglm/lists"}