{"id":22356873,"url":"https://github.com/ayamflow/point-in-line","last_synced_at":"2025-03-26T13:20:46.617Z","repository":{"id":29120150,"uuid":"32649864","full_name":"ayamflow/point-in-line","owner":"ayamflow","description":"Returns a point at length `t` on a given line (two points).","archived":false,"fork":false,"pushed_at":"2015-03-21T21:11:15.000Z","size":120,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-13T16:15:08.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ayamflow.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}},"created_at":"2015-03-21T21:03:34.000Z","updated_at":"2015-03-21T22:25:52.000Z","dependencies_parsed_at":"2022-08-02T12:14:34.640Z","dependency_job_id":null,"html_url":"https://github.com/ayamflow/point-in-line","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/ayamflow%2Fpoint-in-line","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fpoint-in-line/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fpoint-in-line/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fpoint-in-line/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayamflow","download_url":"https://codeload.github.com/ayamflow/point-in-line/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245659026,"owners_count":20651526,"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":[],"created_at":"2024-12-04T14:12:17.311Z","updated_at":"2025-03-26T13:20:46.576Z","avatar_url":"https://github.com/ayamflow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"point-in-line\n===\n\nReturns a point at length `t` on a given line (two points).\n\n`A ----t-------B`\n\n## Installation\n\n`npm i point-in-line --save`\n\n## Usage\n\n`pointInLine(p1, p1, t)`\n\np1, p2 are point. It can be any object as long as it has `.x` and `.y` properties.\nt is a float. Between 0 and 1, the point will be between p1 and p2.\n\n## Exemple\n\n```js\n  var pointInLine = require('point-in-line');\n  var center = {\n    x: window.innerWidth * 0.5,\n    y: window.innerHeight * 0.5\n  };\n\n  var p = {\n    x: 127,\n    y: 43\n  };\n\n  var p1 = pointInLine(center, p, 0.5); // Point at 50% of the line\n  var p2 = pointInLine(p, center, 2); // point at twice the length of the line\n  ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayamflow%2Fpoint-in-line","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayamflow%2Fpoint-in-line","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayamflow%2Fpoint-in-line/lists"}