{"id":13599828,"url":"https://github.com/rustgd/cgmath","last_synced_at":"2025-10-07T02:25:14.303Z","repository":{"id":10261215,"uuid":"12371696","full_name":"rustgd/cgmath","owner":"rustgd","description":"A linear algebra and mathematics library for computer graphics.","archived":false,"fork":false,"pushed_at":"2024-12-07T19:29:05.000Z","size":3134,"stargazers_count":1189,"open_issues_count":65,"forks_count":156,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-09-29T13:40:07.667Z","etag":null,"topics":["computer-graphics","linear-algebra","mathematics-library","matrix","rust","simd","simd-vector","vector"],"latest_commit_sha":null,"homepage":"https://docs.rs/cgmath","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rustgd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-26T05:16:44.000Z","updated_at":"2025-09-27T18:06:17.000Z","dependencies_parsed_at":"2025-01-21T07:01:40.021Z","dependency_job_id":null,"html_url":"https://github.com/rustgd/cgmath","commit_stats":{"total_commits":1262,"total_committers":102,"mean_commits":"12.372549019607844","dds":"0.33201267828843106","last_synced_commit":"d5e765db61cf9039cb625a789a59ddf6b6ab2337"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/rustgd/cgmath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustgd%2Fcgmath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustgd%2Fcgmath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustgd%2Fcgmath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustgd%2Fcgmath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustgd","download_url":"https://codeload.github.com/rustgd/cgmath/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustgd%2Fcgmath/sbom","scorecard":{"id":790713,"data":{"date":"2025-08-11","repo":{"name":"github.com/rustgd/cgmath","commit":"ff840cbf48d79441eaac3e78155df4723511d247"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":7,"reason":"Found 15/21 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/rustgd/cgmath/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/rustgd/cgmath/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/rustgd/cgmath/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/rustgd/cgmath/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/rustgd/cgmath/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/rustgd/cgmath/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:82: update your workflow using https://app.stepsecurity.io/secureworkflow/rustgd/cgmath/tests.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T07:27:23.642Z","repository_id":10261215,"created_at":"2025-08-23T07:27:23.642Z","updated_at":"2025-08-23T07:27:23.642Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708239,"owners_count":26031976,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["computer-graphics","linear-algebra","mathematics-library","matrix","rust","simd","simd-vector","vector"],"created_at":"2024-08-01T17:01:12.781Z","updated_at":"2025-10-07T02:25:14.281Z","avatar_url":"https://github.com/rustgd.png","language":"Rust","readme":"# cgmath-rs\n\n[![Build Status](https://github.com/rustgd/cgmath/workflows/tests/badge.svg)](https://github.com/rustgd/cgmath/actions)\n[![Documentation](https://docs.rs/cgmath/badge.svg)](https://docs.rs/cgmath)\n[![Version](https://img.shields.io/crates/v/cgmath.svg)](https://crates.io/crates/cgmath)\n[![License](https://img.shields.io/crates/l/cgmath.svg)](https://github.com/rustgd/cgmath/blob/master/LICENSE)\n[![Downloads](https://img.shields.io/crates/d/cgmath.svg)](https://crates.io/crates/cgmath)\n[![Gitter](https://badges.gitter.im/brendanzab/cgmath.svg)](https://gitter.im/brendanzab/cgmath)\n\nA linear algebra and mathematics library for computer graphics.\n\nThe library provides:\n\n- vectors: `Vector2`, `Vector3`, `Vector4`\n- square matrices: `Matrix2`, `Matrix3`, `Matrix4`\n- a quaternion type: `Quaternion`\n- rotation matrices: `Basis2`, `Basis3`\n- angle units: `Rad`, `Deg`\n- points: `Point2`, `Point3`\n- perspective projections: `Perspective`, `PerspectiveFov`, `Ortho`, `PlanarFov`\n- spatial transformations: `AffineMatrix3`, `Transform3`\n\nNot all of the functionality has been implemented yet, and the existing code\nis not fully covered by the testsuite. If you encounter any mistakes or\nomissions please let me know by posting an issue, or even better: send me a\npull request with a fix.\n\n## Conventions\n\ncgmath interprets its vectors as column matrices (also known as \"column\nvectors\"), meaning when transforming a vector with a matrix, the matrix goes\non the left. This is reflected in the fact that cgmath implements the\nmultiplication operator for Matrix * Vector, but not Vector * Matrix.\n\n## Features\n\n### Swizzling\nThis library offers an optional feature called\n[\"swizzling\"](https://en.wikipedia.org/wiki/Swizzling_(computer_graphics))\nwidely familiar to GPU programmers. To enable swizzle operators, pass the\n`--features=\"swizzle\"` option to cargo. Enabling this feature will increase\nthe size of the cgmath library by approximately 0.6MB. This isn't an\nissue if the library is linked in the \"normal\" way by adding cgmath as a\ndependency in Cargo.toml, which will link cgmath statically so all unused\nswizzle operators will be optimized away by the compiler in release mode.\n\n#### Example\nIf we have\n```rust\nlet v = Vector3::new(1.0, 2.0, 3.0);\n```\nthen `v.xyxz()` produces a\n```rust\nVector4 { x: 1.0, y: 2.0, z: 1.0, w: 3.0 }\n```\nand `v.zy()` produces a\n```rust\nVector2 { x: 3.0, y: 2.0 }\n```\n### SIMD optimizations\n\nThe current SIMD support depends on the deprecated \"simd\" package as well\nas the unstable \"specialization\" feature. To build this code, a pre-1.33 nightly\nbuild of Rust is required, e.g. 2019-01-01-nightly. Though the code is not\nuseful in its present form, it has some worth preserving as starting point\nfor a future migration (see https://github.com/rustgd/cgmath/issues/490).\n\n## Limitations\n\ncgmath is _not_ an n-dimensional library and is aimed at computer graphics\napplications rather than general linear algebra. It only offers the 2, 3, and\n4 dimensional structures that are more than enough for most computer graphics\napplications. This design decision was made in order to simplify the\nimplementation (Rust cannot parameterize over constants at compile time), and to\nmake dimension-specific optimisations easier in the future.\n\n## Contributing\n\nPull requests are most welcome, especially in the realm of performance\nenhancements and fixing any mistakes I may have made along the way. Unit tests\nand benchmarks are also required, so help on that front would be most\nappreciated.\n","funding_links":[],"categories":["Rust","Scientific Computation"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustgd%2Fcgmath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustgd%2Fcgmath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustgd%2Fcgmath/lists"}