{"id":42489709,"url":"https://github.com/stein197/js-point","last_synced_at":"2026-01-28T11:48:18.054Z","repository":{"id":57679914,"uuid":"492464257","full_name":"stein197/js-point","owner":"stein197","description":"N-dimentional point implementation","archived":false,"fork":false,"pushed_at":"2023-07-15T07:07:06.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T15:05:34.898Z","etag":null,"topics":["2d","3d","point"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/stein197.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-05-15T11:14:06.000Z","updated_at":"2022-05-23T08:13:46.000Z","dependencies_parsed_at":"2022-09-14T03:22:20.301Z","dependency_job_id":null,"html_url":"https://github.com/stein197/js-point","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/stein197/js-point","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stein197%2Fjs-point","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stein197%2Fjs-point/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stein197%2Fjs-point/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stein197%2Fjs-point/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stein197","download_url":"https://codeload.github.com/stein197/js-point/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stein197%2Fjs-point/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["2d","3d","point"],"created_at":"2026-01-28T11:48:17.379Z","updated_at":"2026-01-28T11:48:18.029Z","avatar_url":"https://github.com/stein197.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# N-dimentional point implementation\nThis tiny package contains only one class `Point` that can be used to represen any-dimentional points.\n\n## Installation\n```\nnpm i @stein197/point\n```\n\n## Usage\nRepresents an N-dimentional point which can be applied in both two or three dimentions and more. Basic usage is:\n```ts\nlet p = new Point\u003c3\u003e(0, 1, 2); // three-dimentional point\np.vector; // [0, 1, 2]: plain tuple\np.x; // 0\np.y; // 1\np.z; // 2\n```\nWhen working with two-dimentional points it's worth using static `Point.create()` function which excludes\nredundant `z` property from the instance:\n```ts\nlet p = Point.create\u003c2\u003e(1, 2);\np.x; // 1\np.y; // 2\np.z; // Error - z does not exist\n```\nThe same applies to one-dimentional points:\n```ts\nlet p = Point.create\u003c1\u003e(1);\np.x; // 1\np.y; // Error - y does not exist\n```\n\n## API\n| Method | Return type | Description |\n|---|---|---|\n| `Point\u003cN\u003e.getDistance(point: Point\u003cN\u003e)` | `number` | Resolves the distance length between two points |\n| `Point.interpolate\u003cN\u003e(p1: Point\u003cN\u003e, p2: Point\u003cN\u003e, t: number)` | `Point\u003cN\u003e` | Returns a new point at t between points p1 and p2 |\n\n## NPM scripts\n- `build` builds the project\n- `test` runs unit tests","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstein197%2Fjs-point","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstein197%2Fjs-point","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstein197%2Fjs-point/lists"}