{"id":18785553,"url":"https://github.com/d-exclaimation/swiftcalc","last_synced_at":"2025-10-12T00:05:55.936Z","repository":{"id":103063062,"uuid":"312618108","full_name":"d-exclaimation/swiftcalc","owner":"d-exclaimation","description":"Math Module for Matrices, Vectors, Probabilities","archived":false,"fork":false,"pushed_at":"2020-12-15T06:58:23.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T00:03:19.921Z","etag":null,"topics":["math","mathematics","physics","swift","vector"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d-exclaimation.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":"2020-11-13T15:48:57.000Z","updated_at":"2020-12-07T08:59:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"90ee90b5-07b9-408c-9d80-7fe2b5f60ebe","html_url":"https://github.com/d-exclaimation/swiftcalc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/d-exclaimation/swiftcalc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-exclaimation%2Fswiftcalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-exclaimation%2Fswiftcalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-exclaimation%2Fswiftcalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-exclaimation%2Fswiftcalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-exclaimation","download_url":"https://codeload.github.com/d-exclaimation/swiftcalc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-exclaimation%2Fswiftcalc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009475,"owners_count":26084609,"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-11T02:00:06.511Z","response_time":55,"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":["math","mathematics","physics","swift","vector"],"created_at":"2024-11-07T20:48:46.788Z","updated_at":"2025-10-12T00:05:55.903Z","avatar_url":"https://github.com/d-exclaimation.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swiftcalc\n \nMath Module for Matrices, Vectors, Probabilities\n\nAuthored by Vincent\n\n## Quick Start Guide:\n\nIf you are using an Xcode importing is as easy as dropping files in the folder\n\nIf you are not, I still recommend using Xcode project. \n\n## Importing with Swift Package Manager\n\nUsing it with Swift Package is now a simple drap and drop in your current package folder. (Hopefully lol)\n\nAll the structs, functions, extensions, variables are now adjusted for the Swift Package Manager.\n\nYou can also make a new package source directory. \n\n# Setup\n\n\u003e 1. Download all the files\n\u003e 2. Drop in the project folder\n\u003e 3. Re-compile is necessary\n\u003e 4. Start using it without namespaces\n\ne.g:\n```swift\n\nimport Foundation\n\nprint(Vector3.up)\n// Should print -\u003e Vector3 (0, 1, 0)\n```\n\n# Descriptions:\n\n### Structures / Objects\n\n```swift\nstruct Fraction {...}\n```\n\u003e The representation of a Fraction with all its properties and methods (e.g Fraction(242, 363) // Output: 2 / 3 )\n\n```swift\nstruct Vector2 {...}\n```\n\u003e The representation of a Vector 2 with axis of x and y, with all its properties and methods (e.g Vector2.up, Vector2(4, 2))\n\n```swift\nstruct Vector3 {...}\n```\n\u003e The representation of a Vector 3 with axis of x, y and z, with all its properties and methods (e.g Vector3.forward, Vector3(4, 2, 10))\n\n```swift\nstruct VectorAny {...}\n```\n\u003e The representation of a Vector 3 with n amount of axis with all its properties and methods\n\n```swift\nstruct Matrix {...}\n```\n\u003e The representation of a Matrix of size n (height) x m (width) with all its properties and methods (e.g Matrix.identity(of: 2))\n\n```swift\nstruct AugmentedMatrix {...}\n```\n\u003e The representation of a AugmentedMatrix of size n (height) x m (width) with extra 1 x m sized Matrix with all its properties and methods\n\n### Functions\n\n```swift\nfunc parallelogram(lhs: Vector2 / Vector3, rhs: Vector2 / Vector3) -\u003e Double\n```\n\u003e Calculate the area of a parallelogram using two vectors\n\n```swift\nfunc triangle(lhs: Vector2 / Vector3, rhs: Vector2 / Vector3) -\u003e Double\n```\n\u003e Calculate the are of a triangle using two vectors\n\n### Extensions\n\n[Double] / Array\u003cDouble\u003e\n\n```swift\nfunc dot(with other: [Double]) -\u003e Double?\n```\n\u003e Calculate the dot product of two Double array, return nil if the arrays don't have the same size\n\n```swift\n* Double\n* [Double]\n- [Double]\n```\n\u003e Added multiplication with a Double and Array, as well as reducing with another array\n\n```swift\nvar summed: Double\n```\n\u003e Sum all it's content\n\nInt\n\n```swift\nfunc commonFactor(with other: Int) -\u003e Int\n```\n\u003e Get the common factor of two Integers\n\n```swift\nfunc permute(with num: Int) -\u003e Double \n```\n\u003e Get the permutation of self with num, which num is the number of object selected\n\n```swift\nfunc combine(with num: Int) -\u003e Double \n```\n\u003e Get the combination of self with num, which num is the number of object selected\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-exclaimation%2Fswiftcalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-exclaimation%2Fswiftcalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-exclaimation%2Fswiftcalc/lists"}