{"id":13755860,"url":"https://github.com/Hasnep/roc-linear-algebra","last_synced_at":"2025-05-10T02:33:16.821Z","repository":{"id":246784626,"uuid":"822177031","full_name":"Hasnep/roc-linear-algebra","owner":"Hasnep","description":"🔢 Linear algebra library for small vectors and matrices in Roc","archived":false,"fork":false,"pushed_at":"2024-07-02T14:06:46.000Z","size":66,"stargazers_count":5,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T16:11:23.407Z","etag":null,"topics":["linear-algebra","matrices","roc","roc-lang"],"latest_commit_sha":null,"homepage":"https://hasnep.github.io/roc-linear-algebra","language":"Roc","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hasnep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-30T13:50:23.000Z","updated_at":"2024-09-29T23:50:58.000Z","dependencies_parsed_at":"2024-07-09T09:33:45.588Z","dependency_job_id":null,"html_url":"https://github.com/Hasnep/roc-linear-algebra","commit_stats":null,"previous_names":["hasnep/roc-linear-algebra"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hasnep%2Froc-linear-algebra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hasnep%2Froc-linear-algebra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hasnep%2Froc-linear-algebra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hasnep%2Froc-linear-algebra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hasnep","download_url":"https://codeload.github.com/Hasnep/roc-linear-algebra/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253354490,"owners_count":21895437,"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":["linear-algebra","matrices","roc","roc-lang"],"created_at":"2024-08-03T11:00:31.867Z","updated_at":"2025-05-10T02:33:16.467Z","avatar_url":"https://github.com/Hasnep.png","language":"Roc","funding_links":[],"categories":["Roc Packages 📦"],"sub_categories":[],"readme":"# Roc Linear Algebra\n\nLinear algebra library for small vectors and matrices in Roc.\n\n## Example\n\nImport a matrix and vector type.\n\n```roc\nimport linalg.Matrix4x4\nimport linalg.Vector4\n```\n\nVectors are just tuples.\n\n```roc\nvecA = (1, 2, 3, 4)\nStdout.line! \"Vector a is $(Vector4.display vecA).\"\nvecB = (5, 6, 7, 8)\nStdout.line! \"Vector b is $(Vector4.display vecB).\"\n```\n\n```text\nVector a is [1, 2, 3, 4].\nVector b is [5, 6, 7, 8].\n```\n\nVectors have various vector-y functions that work how you'd expect.\n\n```roc\nvecC = Vector4.add vecA vecB\nStdout.line! \"The sum of a and b is $(Vector4.display vecC).\"\naDotB = Vector4.dot vecA vecB\nStdout.line! \"The dot product of a and b is $(Num.toStr aDotB).\"\n```\n\n```text\nThe sum of a and b is [6, 8, 10, 12].\nThe dot product of a and b is 70.\n```\n\nMatrices are opaque types.\n\n```roc\nmat = Matrix4x4.fromDiagonal vecC\n```\n\nMatrices also have matrix-y functions.\n\n```roc\ndet = Matrix4x4.determinant mat\nStdout.line! \"The determinant of the matrix is $(Num.toStr det).\"\n```\n\n```text\nThe determinant of the matrix is 5760.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHasnep%2Froc-linear-algebra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHasnep%2Froc-linear-algebra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHasnep%2Froc-linear-algebra/lists"}