{"id":16125507,"url":"https://github.com/semibran/vector","last_synced_at":"2025-03-18T13:30:45.730Z","repository":{"id":57151650,"uuid":"88713180","full_name":"semibran/vector","owner":"semibran","description":"Minimal operations for multidimensional vectors","archived":false,"fork":false,"pushed_at":"2017-06-27T02:12:34.000Z","size":11,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T09:43:10.360Z","etag":null,"topics":["geometry","math","multidimensional","trigonometry","vector"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/semibran.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":"2017-04-19T07:12:40.000Z","updated_at":"2020-05-13T14:33:56.000Z","dependencies_parsed_at":"2022-09-09T18:34:28.767Z","dependency_job_id":null,"html_url":"https://github.com/semibran/vector","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fvector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fvector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fvector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fvector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semibran","download_url":"https://codeload.github.com/semibran/vector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243928156,"owners_count":20370243,"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":["geometry","math","multidimensional","trigonometry","vector"],"created_at":"2024-10-09T21:29:51.448Z","updated_at":"2025-03-18T13:30:45.465Z","avatar_url":"https://github.com/semibran.png","language":"JavaScript","readme":"# vctr\n\u003e Minimal operations for multidimensional vectors\n\nThis module assumes that a vector is an array of numbers, allowing these functions to be used on vectors of all dimensions.\n\n## install\n```sh\nnpm install vctr\n```\n\n## usage\n```js\nconst { add, subtract, ... } = require('vctr')\n```\n\n### `add(a, b)`\nReturns the sum of the two provided vectors.\n\n### `subtract(a, b)`\nReturns the difference between the two provided vectors.\n\n### `multiply(a, b)`\nReturns the product of the two provided vectors. The second argument may be a scalar quantity (a `Number`) if desired.\n\n### `divide(a, b)`\nReturns the quotient of the two provided vectors. The second argument may be a scalar quantity (a `Number`) if desired.\n\n### `dot(a, b)`\nDetermines the dot product of the two provided vectors.\n\n### `compose(vector)`\nConverts `vector` from Cartesian coordinates to spherical coordinates `{ direction, magnitude }`.\n\n### `resolve(vector)`\nConverts `vector` from spherical coordinates to Cartesian coordinates.\n\n### `direction(vector)`\nCalculates the direction in which `vector` is pointing, in radians.\n\n### `magnitude(vector)`\nCalculates the distance covered by `vector`.\n\n### `normalize(vector)`\nConverts `vector` to a unit vector.\n\n### `distance(a, b)`\nDetermines the distance (a scalar quantity) between the two provided vectors.\n\n## see also\n- [`semibran/radians`](https://github.com/semibran/radians) - convert between radians and degrees\n\n## license\n[MIT](https://opensource.org/licenses/MIT) © [Brandon Semilla](https://git.io/semibran)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemibran%2Fvector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemibran%2Fvector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemibran%2Fvector/lists"}