{"id":13776244,"url":"https://github.com/spate/vectormath","last_synced_at":"2025-05-11T10:30:53.006Z","repository":{"id":4767717,"uuid":"5918702","full_name":"spate/vectormath","owner":"spate","description":"Vectormath for Go","archived":false,"fork":false,"pushed_at":"2019-07-09T03:45:31.000Z","size":25,"stargazers_count":64,"open_issues_count":2,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-02-15T10:31:41.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spate.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":"2012-09-23T02:05:12.000Z","updated_at":"2023-01-24T00:30:31.000Z","dependencies_parsed_at":"2022-08-17T23:05:33.633Z","dependency_job_id":null,"html_url":"https://github.com/spate/vectormath","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spate%2Fvectormath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spate%2Fvectormath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spate%2Fvectormath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spate%2Fvectormath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spate","download_url":"https://codeload.github.com/spate/vectormath/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253551495,"owners_count":21926303,"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":"2024-08-03T18:00:20.354Z","updated_at":"2025-05-11T10:30:52.655Z","avatar_url":"https://github.com/spate.png","language":"Go","funding_links":[],"categories":["Science and Data Analysis","科學及數據分析","\u003cspan id=\"科学和数据分析-science-and-data-analysis\"\u003e科学和数据分析 Science and Data Analysis\u003c/span\u003e","科学及数据分析","科学和数据分析","Go"],"sub_categories":["Advanced Console UIs","高級控制台界面","Middlewares","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高级控制台界面"],"readme":"Vectormath for Go\n=================\n\nThis is an adaptation of the scalar C functions from Sony's Vector Math\nlibrary, as found in the Bullet-2.79 source code. (Note that the current svn\nfor Bullet retains a subset of this library in a different location.) The full\nlibrary can be found in the following directory of the Bullet-2.79 source\ntarball:\n\n    Extras/vectormathlibrary/include/vectormath/scalar/c\n\nSpecial thanks to Sony Computer Entertainment Inc. for allowing the use of\ntheir Vector Math library under a BSD-style license, which made this possible.\n\nApproach\n--------\n\nStart with a direct conversion of the Sony library to Go. (This was shipping\ncode, so we will assume it's correct.) Then iterate to make it more Go-like,\nwhile trying to balance the twin goals of same/better performance and\nmaintaining readability.\n\nThe C version of the library, as opposed to the C++ version, was chosen as a\nstarting point mainly to avoid the distraction of function renaming, as the C++\nversion of Sony's library relies somewhat on operator and function overloads,\nwhich have no direct equivalent in Go.\n\nNote that the original C library provides two versions of each file, e.g.,\nvec_aos.h and vec_aos_v.h. I've brought over the former as opposed to the\nlatter, since this simplifies things for beginners. The 'result' argument is\nalways a pointer passed as the first argument to a function. Currently, the\nonly types used in this library that are passed by value are simple types,\ne.g., float and int. Everything else is a pointer. (This should, in theory,\nsimplify memory thrash considerations as well. In practice.. I have no idea. :)\n\nFuture Direction\n----------------\n\nFurther research is required for determining:\n- What makes the most sense for optimizing this code for SIMD\n- Whether we should be passing vectors, etc., by value instead of reference\n- If we should continue to declare vectors as individual values as opposed to\n  an array of values. This would avoid the branching currently required to\n  access members by index, but would disallow accessing members by common name\n  (x, y, z and w) due to Golang's lack of a union equivalent.\n- Whether it makes sense to stay with 32-bit, or if we would get the same\n  performance with 64-bit\n\nFeedback on this library is welcome and appreciated, though I make no promises\nabout my ability to deliver on anything beyond what you see here. :)\n\nLicense\n-------\n\nI have licensed my modifications under a license similar to that of the\noriginal library on which this is based. See the LICENSE file for more details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspate%2Fvectormath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspate%2Fvectormath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspate%2Fvectormath/lists"}