{"id":16140519,"url":"https://github.com/anthonyec/vector2","last_synced_at":"2025-04-06T18:25:25.859Z","repository":{"id":151712155,"uuid":"593641425","full_name":"anthonyec/vector2","owner":"anthonyec","description":"↔️ Simple 2D vector library","archived":false,"fork":false,"pushed_at":"2023-08-20T11:08:25.000Z","size":53,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-13T00:26:35.506Z","etag":null,"topics":["library","typescript","vector2d","vectors"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/anthonyec.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":"2023-01-26T14:11:45.000Z","updated_at":"2024-01-19T18:21:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0bf281f-a392-49cc-8a49-289b6001dea5","html_url":"https://github.com/anthonyec/vector2","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonyec%2Fvector2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonyec%2Fvector2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonyec%2Fvector2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonyec%2Fvector2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonyec","download_url":"https://codeload.github.com/anthonyec/vector2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247528391,"owners_count":20953412,"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":["library","typescript","vector2d","vectors"],"created_at":"2024-10-09T23:53:01.771Z","updated_at":"2025-04-06T18:25:25.827Z","avatar_url":"https://github.com/anthonyec.png","language":"TypeScript","readme":"# Vector2\n\n\u003e Utility class written in TypeScript for dealing with 2D vectors in an immutable way.\n\n## Why\nI made this to better understand vectors and I like working with vectors that behave like primitive types (like in Godot), where the result is always a new value.\n\n## Usage\n\n```ts\n// Adding two vectors together.\nconst a = new Vector(10, 10);\nconst b = new Vector(50, 80);\n\n// Adding `a` to `b` will not modify `a`, it returns a new vector.\nconst result = a.add(b);\n\n// Methods can be chained.\nconst scaled = a.add(b).normalized().scale(10);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonyec%2Fvector2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonyec%2Fvector2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonyec%2Fvector2/lists"}