{"_id":"radial-index","_rev":"26-4886c4906bcce48a614883ea04001c9b","name":"radial-index","description":"compute radial order indices from unordered Cartesian coordinates relative to the origin or a specified point","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"radial-index","version":"0.1.0","description":"compute radial order indices from unordered Cartesian coordinates relative to the origin or a specified point","main":"index.js","dependencies":{"lodash":"0.9.0"},"scripts":{"test":"node test"},"repository":{"type":"git","url":"https://github.com/AgileDiagnosis/radial-index"},"keywords":["coordinate","radian","arctan"],"author":{"name":"Agile Diagnosis","email":"hello@agilediagnosis.com"},"contributors":[{"name":"agilekurt","email":"kurt@agilediagnosis.com"}],"license":"MIT","_id":"radial-index@0.1.0","dist":{"shasum":"2f5c5b45f4d649d3b030b947ad1d5a91d0f594af","tarball":"https://registry.npmjs.org/radial-index/-/radial-index-0.1.0.tgz","integrity":"sha512-Gh3Z176uk+2F9sbjzxYIJh8fvU8JAkS8pYjgeFU/RDu9HMLSchDLK6zm7NWxgIxpXHg66FFz9EMfJW6IN6fymw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6QI9TN2AAkjbVTmU7lvwRhZZXC8qcpisPe5lP261V9AiB/tLI9veVIEBF2zSGl4sMVutkQOX0QIIg0FS1Kugew4Q=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"agilekurt","email":"kurt@agilediagnosis.com"},"maintainers":[{"name":"agilekurt","email":"kurt@agilediagnosis.com"}]},"0.1.1":{"name":"radial-index","version":"0.1.1","description":"compute radial order indices from unordered Cartesian coordinates relative to the origin or a specified point","main":"index.js","dependencies":{"lodash":"0.9.0"},"scripts":{"test":"node test"},"repository":{"type":"git","url":"https://github.com/AgileDiagnosis/radial-index"},"keywords":["coordinate","radian","arctan"],"author":{"name":"Agile Diagnosis","email":"hello@agilediagnosis.com"},"contributors":[{"name":"agilekurt","email":"kurt@agilediagnosis.com"}],"license":"MIT","_id":"radial-index@0.1.1","dist":{"shasum":"5784f23894a0af15629d3e31d8b0b9a1b8416f1d","tarball":"https://registry.npmjs.org/radial-index/-/radial-index-0.1.1.tgz","integrity":"sha512-JBj7h82skikecLGs+ydVC8wN74R7zSdIIbodf33MhjFVDD0LDWdRABZ1ZJB/h4gZMp/ylGY3nNIcXr/GR0TFig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFc0chSbfMmDsYzpSxXWambWzBrGK5J3ywRd4qC0oUxVAiA4KygfRQ9kCezKW7iMbq3uMV+ps1M/PdRCJ+szd4e9Kw=="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"agilekurt","email":"kurt@agilediagnosis.com"},"maintainers":[{"name":"agilekurt","email":"kurt@agilediagnosis.com"}]},"0.1.2":{"name":"radial-index","version":"0.1.2","description":"compute radial order indices from unordered Cartesian coordinates relative to the origin or a specified point","main":"index.js","dependencies":{"lodash":"0.9.0"},"scripts":{"test":"node test"},"repository":{"type":"git","url":"https://github.com/AgileDiagnosis/radial-index"},"keywords":["coordinate","radian","arctan"],"author":{"name":"Agile Diagnosis","email":"hello@agilediagnosis.com"},"contributors":[{"name":"agilekurt","email":"kurt@agilediagnosis.com"}],"license":"MIT","_id":"radial-index@0.1.2","dist":{"shasum":"826a6041f85d5ec5e48329047c0f6d1b5165c5e8","tarball":"https://registry.npmjs.org/radial-index/-/radial-index-0.1.2.tgz","integrity":"sha512-6CT8E5DinU2/MXy4KFhE6EiYxuRSYUG/oqJar9OA/ExKqPgf5f0Go3vm71Xk+CJBGpyoWasHXIfRv/cim9CUoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoAySuENlB8Txiy30TPrD+ZhK0YRhpS4mBci1zeuE5lAIhAMnswngTmZGL/Bfx+Q6BPos81TPPXNOV/0VFApb3b9Lb"}]},"_npmVersion":"1.1.69","_npmUser":{"name":"agilekurt","email":"kurt@agilediagnosis.com"},"maintainers":[{"name":"agilekurt","email":"kurt@agilediagnosis.com"}]},"1.0.0":{"name":"radial-index","version":"1.0.0","description":"compute radial order indices from unordered Cartesian coordinates relative to the origin or a specified point","main":"index.js","dependencies":{"lodash":"0.9.0"},"scripts":{"test":"node test"},"repository":{"type":"git","url":"https://github.com/kurttheviking/radial-index"},"keywords":["circular index","radial index","coordinate","radian","arctan"],"author":{"name":"kurttheviking","email":"kurttheviking@outlook.com"},"contributors":[{"name":"kurttheviking","email":"kurttheviking@outlook.com"}],"license":"MIT","bugs":{"url":"https://github.com/kurttheviking/radial-index/issues"},"_id":"radial-index@1.0.0","dist":{"shasum":"8985055c8f7cfdbd6de73348b690975911e241c5","tarball":"https://registry.npmjs.org/radial-index/-/radial-index-1.0.0.tgz","integrity":"sha512-CUB/FiCPl13YEDYpt7NC5EI2Lur0UJjflsIJrpweuyeWkLzTo8mXx9EgZk70RiQ5m3n30GOHnpSZtE+pe2Cdug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCW99M8h4l/d5H5jzD5INRquuYOYMJwnrgQlEM0xjjO1QIgIUGQ/GW8XwHZx8ffj7dxNnTKuXa7WOIR5218JnS+igY="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"kurttheviking","email":"kurttheviking@outlook.com"},"maintainers":[{"name":"kurttheviking","email":"kurttheviking@outlook.com"}]},"1.0.1":{"name":"radial-index","version":"1.0.1","description":"compute radial order indices from unordered Cartesian coordinates relative to the origin or a specified point","main":"index.js","dependencies":{"lodash":"0.9.0"},"scripts":{"test":"node test"},"repository":{"type":"git","url":"https://github.com/kurttheviking/radial-index"},"keywords":["circular index","radial index","coordinate","radian","arctan"],"author":{"name":"kurttheviking","email":"kurttheviking@outlook.com"},"contributors":[{"name":"kurttheviking","email":"kurttheviking@outlook.com"}],"license":"MIT","bugs":{"url":"https://github.com/kurttheviking/radial-index/issues"},"_id":"radial-index@1.0.1","dist":{"shasum":"1745697ac6a83e86e9dd2662f07745749a941892","tarball":"https://registry.npmjs.org/radial-index/-/radial-index-1.0.1.tgz","integrity":"sha512-Z4Vlvs0hM23gNk7ri0GlMHH/xlnwZQ1JKtXYZw0tcO5Uo7C2lziUlWQnhN0atIacCNhzwXtWEryUug9ncyMWqQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9aMcuz54URhl4c6gLgeVxmmqhZtBczQ1Dlhvlazks9QIgAmDe/dxiwhH5jLmLe5mczDCNd1SfXWqy6QWaia+yfPE="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"kurttheviking","email":"kurttheviking@outlook.com"},"maintainers":[{"name":"kurttheviking","email":"kurttheviking@outlook.com"}]}},"readme":"radial-index\n============\n\nCompute radial order indices from unordered Cartesian coordinates relative to the origin or a specified point.\n\n\n### Use\n\n    $ var ri = require('radial-index')\n    $ var points = [\n        [-10, -26],\n        [-11, 18],\n        [11, 27]\n      ];\n    $ console.log(ri.getIndicesFromPoints(points));\n    [1, 2, 0]\n\nNote that the response array provides the indices in the same sequence as the original points argument.\n\n\n### Options\n\n`getIndicesFromPoints` optionally takes a configuration object as its second argument. That configuration object provides three additional parameters to `getIndicesFromPoints`.\n\n\n    {\n        center:    Array. Format: [x, y]. Set the coordinate around which the radial indexing will occur.\n        ccw:       Boolean. (Any truthy value.) Compute indices with a counter-clockwise rotation.\n        rotate:    Number. From -360 to 360. The degree offset from the positive y-axis to begin the indexing rotation.\n    }\n\n\n`center` is set to the origin [0, 0] unless otherwise specified. Also by default, `getIndicesFromPoints` indexes points in a [clockwise fashion](http://en.wikipedia.org/wiki/Clockwise) starting from the positive y-axis (start at the 12 o'clock position moving to the right). To override this behavior and rotate in a counter-clockwise fashion, set `ccw` to `true`. Finally, `rotate` controls the angle from which the indexing movement should begin--by default, the positive y-axis. Setting `rotate` to 90, for example, would start the indexing at the positive x-axis instead.\n\n\n### Examples\n\n             [y]\n           (0, 100)\n              |\n              |  A\n              |\n    ----------+---------- (100, 0) [x]\n     C        |\n              |     B\n              |\n\nFor the following examples, assume that `A` = [A.x, A.y], `B` = [B.x, B.y], etc. By default, `getIndicesFromPoints([A, B, C])` would return `[0, 1, 2]` because the indexer would start from [y] and sweep clockwise hitting A, then B, then C. That is:\n\n    $ ri.getIndicesFromPoints([A, B, C])\n    [0, 1, 2]\n\nOther examples:\n\n    $ ri.getIndicesFromPoints([A, B, C], {ccw: true})\n    [2, 1, 0]\n\n    $ ri.getIndicesFromPoints([A, B, C], {rotate: 90})\n    [2, 0, 1]\n\n    $ ri.getIndicesFromPoints([A, B, C], {ccw: true, rotate: 270})\n    [2, 1, 0]\n\n    $ ri.getIndicesFromPoints([A, B, C], {center: [-500, -500]})\n    [1, 2, 0]\n\n\n### Install\n\n    npm install radial-index\n\n\n### Test\n\n    npm test\n\n\n### Caveat emptor\n\nCalculating the radial component of a polar coordinate relies on trignometric functions that often produce extended floating point numbers. The accuracy of indexing is therefore subject to JavaScript's floating point precision limitations. For general information about floating point issues see [the floating point guide](https://github.com/brazzy/floating-point-gui.de).\n","maintainers":[{"email":"npm@kurttheviking.com","name":"kurttheviking"}],"time":{"modified":"2022-06-25T09:35:18.201Z","created":"2013-02-10T07:07:42.268Z","0.1.0":"2013-02-10T07:07:44.057Z","0.1.1":"2013-02-11T20:37:46.985Z","0.1.2":"2013-02-11T20:39:50.408Z","1.0.0":"2014-07-06T20:30:21.283Z","1.0.1":"2014-07-06T20:33:22.517Z"},"author":{"name":"kurttheviking","email":"kurttheviking@outlook.com"},"repository":{"type":"git","url":"https://github.com/kurttheviking/radial-index"},"users":{"jden":true,"agilediagnosis":true,"jsdnxx":true},"readmeFilename":"README.md","keywords":["circular index","radial index","coordinate","radian","arctan"],"contributors":[{"name":"kurttheviking","email":"kurttheviking@outlook.com"}],"license":"MIT","bugs":{"url":"https://github.com/kurttheviking/radial-index/issues"}}