{"id":18712758,"url":"https://github.com/apexskier/sklinearalgebra","last_synced_at":"2025-04-12T11:54:23.201Z","repository":{"id":27788897,"uuid":"31277777","full_name":"apexskier/SKLinearAlgebra","owner":"apexskier","description":"Swift extensions for Linear Algebra with SceneKit","archived":false,"fork":false,"pushed_at":"2017-07-04T13:40:28.000Z","size":53,"stargazers_count":54,"open_issues_count":0,"forks_count":11,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-26T06:41:46.979Z","etag":null,"topics":["linear-algebra","scenekit","swift-library","vectors"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apexskier.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":"2015-02-24T19:31:23.000Z","updated_at":"2024-01-22T13:15:24.000Z","dependencies_parsed_at":"2022-09-04T21:10:15.904Z","dependency_job_id":null,"html_url":"https://github.com/apexskier/SKLinearAlgebra","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/apexskier%2FSKLinearAlgebra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apexskier%2FSKLinearAlgebra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apexskier%2FSKLinearAlgebra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apexskier%2FSKLinearAlgebra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apexskier","download_url":"https://codeload.github.com/apexskier/SKLinearAlgebra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565052,"owners_count":21125415,"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","scenekit","swift-library","vectors"],"created_at":"2024-11-07T12:43:40.458Z","updated_at":"2025-04-12T11:54:23.176Z","avatar_url":"https://github.com/apexskier.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SKLinearAlgebra\n[![Build Status](http://img.shields.io/travis/apexskier/SKLinearAlgebra.svg)](https://travis-ci.org/apexskier/SKLinearAlgebra)\n\n\nThis library allows common vector operations using SceneKit's\n[native types](https://developer.apple.com/library/ios/documentation/SceneKit/Reference/SceneKit_DataTypes/): \n`SCNVector3`, `SCNVector4`, and `SCNMatrix4`. It also provides useful\nlinear algebra functions for 3D graphics.\n\nIt has been written in the style of Swift, intending to enhance and complete \nScenekit's existing\n[functions](https://developer.apple.com/library/mac/documentation/SceneKit/Reference/SceneKit_Functions/).\n\n## Features\n\nTests are complete for all implemented features.\n\n### Operations\n\n- equality (`==`)\n- inequality (`!=`)\n- equivalence (`~=`)\n  - Returns true if the components are close to equal to each other.\n- inequivalence (`!~=`)\n- addition (`+`, `+=`)\n- subtraction (`-`, `-=`)\n- dot product (`*`)\n- scalar multiplication (`*`, `*=`)\n- scalar division (`/`, `/=`)\n- cross product (`×`)\n- subscript access (`v[0]`, `m[1, 2]`)\n  - Zero based indexing\n  - Access by [row, column]\n\n### Functions\n\n- cross product (`cross(a: Vector, b: Vector)`)\n- magnitude (`magnitude(v: Vector)`)\n- normalize (`normalize(v: Vector)`)\n- angle between (`angle(a: Vector, b: Vector)`)\n- component (`component(a: Vector, b: Vector)`) - comp_{b} a\n  - Read this as \"the component of a onto b\", it would be written comp_{b} a.\n- projection (`projection(a: Vector, b: Vector)`)\n  - Read this as \"the projection of a onto b\", it would be written proj_{b} a\n- determinate (`det(m: Matrix)`)\n- transpose (`transpose(m: Matrix)`)\n- inverse (`inverse(m: Matrix)`)\n\n## Usage\n\nThe documentation for using a custom Swift library is lacking at the moment, but\nmy process has been as follows:\n\n1. Clone `git@github.com:apexskier/SKLinearAlgebra.git` into your project directory.\n2. Drag `SKLinearAlgebra.xcodeproj` into your Xcode project.\n4. Select your project, select your target, under General find \"Linked Frameworks and Libraries\".\n3. Add `SKLinearAlgebra.framework`, either from the + button or by dragging in `SKLinearAlgebra/Products/SKLinearAlgebra.framework` from the project navigator.\n\n```Swift\n// Example import statements\n\nimport SceneKit\nimport SKLinearAlgebra\n\nlet vector = SCNVector4(x: 1, y: 2, z: 3, w: 4)\nvector *= 4\nprintln(vector)\n```\n\n## Future Plans\n\n- Some kind of support for bases (origin + 3 vectors)\n  - Conversion between basis\n- Use specific type aliases\n  - Vectors for colors, locations, directions, rotations\n- Rotation utilities\n- Torque and Force utilities\n- Utilize [Accelerate](https://developer.apple.com/library/mac/documentation/Accelerate/Reference/AccelerateFWRef/) or [Surge](https://github.com/mattt/Surge)\n\n\n\n\nYou should follow [me on Twitter](https://twitter.com/apexskier).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapexskier%2Fsklinearalgebra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapexskier%2Fsklinearalgebra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapexskier%2Fsklinearalgebra/lists"}