{"_id":"@cursorsdottsx/vectors","_rev":"2-91bbcde129730d968e144f10323f57ed","name":"@cursorsdottsx/vectors","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@cursorsdottsx/vectors","version":"1.0.0","description":"Over-engineered, multi-dimensional and firmly typed vector creation library.","main":"index.js","scripts":{},"repository":{"type":"git","url":"git+https://github.com/cursorsdottsx/vectors.git"},"keywords":[],"author":{"name":"cursorsdottsx","email":"cursors.dev@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/cursorsdottsx/vectors/issues"},"homepage":"https://github.com/cursorsdottsx/vectors#readme","devDependencies":{"@types/node":"^16.3.0","tslib":"^2.3.0","typescript":"^4.3.5"},"gitHead":"ed3bc6c640f6f70ec209ec9a52c878759c149d87","_id":"@cursorsdottsx/vectors@1.0.0","_nodeVersion":"15.14.0","_npmVersion":"7.7.6","dist":{"integrity":"sha512-bkvQDE224+y6AQs0+HfUd/hl+92kv/M4YgsVstUZu+dY9MYIOGqxavbxl8O8sPleVRh9jo7LA356lc96SLaasg==","shasum":"61adf13c94820fc19e20fef4de9a1cc2216c4355","tarball":"https://registry.npmjs.org/@cursorsdottsx/vectors/-/vectors-1.0.0.tgz","fileCount":5,"unpackedSize":23793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6NndCRA9TVsSAnZWagAAudsQAJxcFoFy8gYIAidThvbd\nWY4N3d+QVoj/pynHbmbdWUEe53ZuAnNj7iRv+3ZEB8nDHubJ8kZMBbVT/MgU\nCeN/tOOo/azYHExMfzBz1VxZFxtgf+hZMjuBn1MKjvEStFN44zsopOfuPr9O\nuBjxlHLsl6udBneSOejJ/S4i6wQ4jc6sCmbAxssdt2QJUkLAZo1kTPR7Doqr\n1JgG0x+gnccmoLV8RbDTIPGxTK3LthFQlf5hMZo71UjLoe7dcXrFTQ4XH+11\nW3NRYKUg9xy75/WRwRWRko5ZD6Ah88HqBomYN3NbaBN6XfIOdrUiqufjVpuM\nDi0/WNHqI6TVnfrqRoEBI22pxB1MRV+6CFbmckNQxOBCsHO4OQ+B9EKnuioj\nxGsXHmHOAeaiyoy0pmNF0CgCXkz3EuacS8nRkRfhvKKuwl6y6j0hLDjza25x\niD4v7ikisoPdPzs3PT/aH+Pqm+jW/FpW9fCGS1BsVjp1C8Qb2rfxMTOo2FA9\nsqflT1+3NGFeHOaxL7QgXlS7GpbLFz8SUCx43YsPZOs11xpvTKx2TYuVh8ha\nTw4j2QSIl/MK+L/1NS6u6zFjP7jU1p3uslbt/gPb+lSaNL0XiowvmYScn2hY\n+o+ZsxFpTJYroEzbLuMLR06Qrw8bFMgXAxVtQ1upMRuRS0EfVbh5vGZbXiYF\n33ml\r\n=ufNf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmSYb4MSlJ55i5LCY2dnFap2BFlIwhI2JEdUJlxRJ2xwIhAOVXnpJBam3hmHuse5t/co+hAquw+4rZRRhQFRlaYxUm"}]},"_npmUser":{"name":"cursorspkg","email":"cursors.dev@gmail.com"},"directories":{},"maintainers":[{"name":"cursorspkg","email":"cursors.dev@gmail.com"},{"name":"cursorsdev","email":"cursors.alt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vectors_1.0.0_1625872861125_0.13430693505368207"},"_hasShrinkwrap":false},"1.0.1":{"name":"@cursorsdottsx/vectors","version":"1.0.1","description":"Over-engineered, multi-dimensional and firmly typed vector creation library.","main":"index.js","scripts":{},"repository":{"type":"git","url":"git+https://github.com/cursorsdottsx/vectors.git"},"keywords":[],"author":{"name":"cursorsdottsx","email":"cursors.dev@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/cursorsdottsx/vectors/issues"},"homepage":"https://github.com/cursorsdottsx/vectors#readme","devDependencies":{"@types/node":"^16.3.0","tslib":"^2.3.0","typescript":"^4.3.5"},"gitHead":"114be61a16ef1185bc8b9acd20b932189ebbd649","_id":"@cursorsdottsx/vectors@1.0.1","_nodeVersion":"15.14.0","_npmVersion":"7.7.6","dist":{"integrity":"sha512-dlvJbcVMq2/KK/kMdS1qrzlaredpSylSncXTjwnOrJYpk6eMRUZFEImk6/qyiAR9LD1h2/Wz4C3fTKTcOcBKHg==","shasum":"be96a7fd3f8f94eb55607b24a85153acc5e98ce3","tarball":"https://registry.npmjs.org/@cursorsdottsx/vectors/-/vectors-1.0.1.tgz","fileCount":5,"unpackedSize":23793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6NwKCRA9TVsSAnZWagAABpYP+wR6Sese9GqR7CiuyMI5\nys0xPCKJeCGqYok48YefDxPXMbJ3+R/u4SViwJCf5hHx12i3HbJ5OT9LNlEQ\nDlXdjdSz0yiaxXAru4sOb5/tDXI/3A0PAwARZ7agqT9otQyDUIFWm67pvtpI\nYfkhYhqUOPwalkYsENUJ+pzmBnld/MA3B7MwRgHDZqZt1tz4i5RdqRyH9ApF\n/Gad0T8lFfnsxRXJt4xQYt+ltJ/qtoVjWVUWbv9HpUYafWZZvT8q17gorh5p\ny/i/8623X/Inh4mZjSieqU/6e+N08eVuYc5jZRzzC9X0i3sLiSr2NxCPwNUg\nqVVdGlzC0GktXEJpOBfB3xLRVV/T3f656iEb43KxvpCmfTKFcI5GIOS8f3yZ\n+XYU7RvspbAQ4qHg0k/bodS7S2/PIxl8AvtvkiXeoA8eQoE2k8Ns4PPpzknp\nEqH6oN6D4PCitKi1O7GPtYAuTw68yJvoFg6vkYdSBqTCzXITLhkfjdBDSdz8\n5v9ZQ8zxhN9ulzRlgZznBBdOhFcT46g9dN32eFGUww15hnuJVfdtQBHtoqpX\nmww+sUuG3JelCYL4B+2TZGJpaCbAJPQE73ib1egfpOKwskFb8Rf7Zk5DF7C8\n/LmMqlipawcnkuWy7UFx6bwFXpMuqr/G9wSqG4PBfsaU91STM8TizPtp+37w\nQ6UG\r\n=ngDS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzTaQMPnY3I0yR1KR5BlbldV5C0Dk+nYTNi6i66U+xrAIgOCyjgZQWfMIyoA2MTK3l5BX+6sH4LjPTLjSJOfaopms="}]},"_npmUser":{"name":"cursorspkg","email":"cursors.dev@gmail.com"},"directories":{},"maintainers":[{"name":"cursorspkg","email":"cursors.dev@gmail.com"},{"name":"cursorsdev","email":"cursors.alt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vectors_1.0.1_1625873418040_0.26630549126983993"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-09T23:21:00.766Z","1.0.0":"2021-07-09T23:21:01.446Z","modified":"2022-04-05T02:20:41.206Z","1.0.1":"2021-07-09T23:30:18.169Z"},"maintainers":[{"name":"cursorspkg","email":"cursors.dev@gmail.com"},{"name":"cursorsdev","email":"cursors.alt@gmail.com"}],"description":"Over-engineered, multi-dimensional and firmly typed vector creation library.","homepage":"https://github.com/cursorsdottsx/vectors#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/cursorsdottsx/vectors.git"},"author":{"name":"cursorsdottsx","email":"cursors.dev@gmail.com"},"bugs":{"url":"https://github.com/cursorsdottsx/vectors/issues"},"license":"MIT","readme":"# @cursorsdottsx/vectors\n\n> Over-engineered, multi-dimensional and firmly typed vector creation library.\n\n<small>Represents vectors from 1 to 26 dimensions (because we ran out of reasonable axis names).</small>\n\n#### Installation and usage\n\n```\n$ npm install @cursorsdottsx/vectors --save\n```\n\n```\n$ yarn add @cursorsdottsx/vectors\n```\n\n```js\nconst create = require(\"@cursorsdottsx/vectors\");\n```\n\n```ts\nimport create from \"@cursorsdottsx/vectors\";\n```\n\n```js\nimport create from \"@cursorsdottsx/vectors\";\n\nconst Vector2 = create(2);\nconst Vector3 = create(3);\n\nconst vec2 = new Vector2();\nconst vec3 = new Vector3();\n\n/* prop || type */\n\nvec2.x; // number\nvec2.y; // number\nvec2.z; // undefined\n\nvec3.z; // number\n```\n\n#### API\n\n```js\n/**\n * @typedef {object} CreateVectorOptions\n * @prop {string | string[]} exclude\n * @prop {boolean} immutable\n */\n\n/**\n * @param {number} components\n * @param {CreateVectorOptions} options\n * @returns Vector\n */\ncreate(components, options?);\n```\n\n```js\nVector {};\n\nVector.prototype;\n\n/**\n * dot        :  dot product\n * angleTo    :  angle to another vector\n * magnitude  :  magnitude of vector\n * length     :  alias for magnitude\n * max        :  largest component\n * min        :  smallest component\n * equals     :  check for equality\n * toArray    :  convert vector to array\n * normalize  :  normalize vector\n * negate     :  negate all components\n * clone      :  clone vector\n * toPoint    :  convert vector to point object\n */\n```\n","readmeFilename":"README.md"}