{"_id":"2dv","_rev":"3-5ff46d8ab82c64d645b4c3417abbe4d0","name":"2dv","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.1":{"name":"2dv","version":"1.0.1","description":"Very useful small class to perform vector calculations. Very practical as basis for all kinds of simulations and games where objects move through a two-dimensional space. ","main":"lib/index.js","types":"lib/index.d.ts","keywords":["vector","vector math","javascript","typescript"],"scripts":{"build":"tsc","docs":"typedoc --out docs src"},"repository":{"type":"git","url":"git+https://github.com/wetterben/vector2d.git"},"author":{"name":"Ben Weber"},"license":"ISC","bugs":{"url":"https://github.com/wetterben/vector2d/issues"},"homepage":"https://github.com/wetterben/vector2d#readme","devDependencies":{"@types/node":"^14.0.13","typedoc":"^0.17.8","typescript":"^3.8.3"},"gitHead":"231eff6948b2fdda7ab65e5595439c79fcdb2776","_id":"2dv@1.0.1","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-Oqxn9T1RtsMJgAa5Mh6oQ5WuWR6vBwf9N2veucswPaDx8RsD5ktYWndqOLVuBTrB7r289zp+Kt4Wd4szoeXWsQ==","shasum":"ea74402937502bb50c47afb4859ac1a029fff918","tarball":"https://registry.npmjs.org/2dv/-/2dv-1.0.1.tgz","fileCount":4,"unpackedSize":14275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBcP1CRA9TVsSAnZWagAAvaEQAIjjwXZa8Z/PR/em2dFr\nGylKaOO4K64nN5tyoW5l0Rqf5WHtPJHyofpqHCEIq7Q1k5Pc6716UpA32KKz\nvsAObgbf8/sl9Lfg4XwmhtGksWIJCladnjiGBA7+KR41KrxVJy78rDGhctsO\nMj972wMFmgXvT7TrLkHOIsXFokabhVZxuKW7x08Q1gHO2vBLuZpISnfSKDMT\nm/oV7VyXxgjcTJdgjOCZ4qY5CRnnqLFVIxSoacpEXeFAzjHQSTD+Kkt0nGAa\nmBmnIFdHHVCFydeWBF5lPzo7Z0hqRobn0ZAgBxsmU8QNSJVkNYTJqxjcRp7w\nbmlk9OMl3oLFKsQ4N03BBLkq86uZfgf9g/pCYr0ppdvJj1GjiV/0I2VbElzN\nhB2sbTJRNaKj+L4EBktWsuJwSV8zs3QXNJfMMtLLx0dxu8twHpPW8Y0aQS68\n0NXWHtTC/33X8g7MBUrhMCl6hHlVemaNhiQOdHyGu6r3KUDTxfxzX1gRJJl0\nD+3Wfw7HpDPZq2BkZrgKtoQq1YAuxqiqzqXsoGEraDOnRzMATnKi6Mq6HXsR\n9ShSthC1Jm7Csm9n7ud6Zz+pp1k3jj7/hDMaBNByOp/oRRsyr5CU5LxkzZs9\nPY16anko/BkY4pQKPVSMlBHFFvnsCaJZNcOrVBaeDQ+WbpRD8pZXbGretuXZ\n+ixt\r\n=eOCQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDK7HREPIbmI9UnFU+GktmayahGEbCYdw4pzsuDMmi/+wIgK3DhJQrlzdvEzdTSGT7+HPGfrualLum6yomyNzrQLrg="}]},"maintainers":[{"name":"wetterben","email":"ben@wettergifhorn.de"}],"_npmUser":{"name":"wetterben","email":"ben@wettergifhorn.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2dv_1.0.1_1594213365280_0.2912684647320847"},"_hasShrinkwrap":false},"1.0.2":{"name":"2dv","version":"1.0.2","description":"Very useful small class to perform vector calculations. Very practical as basis for all kinds of simulations and games where objects move through a two-dimensional space. ","main":"lib/index.js","types":"lib/index.d.ts","keywords":["vector","vector math","javascript","typescript"],"scripts":{"build":"tsc","docs":"typedoc --out docs src"},"repository":{"type":"git","url":"git+https://github.com/wetterben/vector2d.git"},"author":{"name":"Ben Weber"},"license":"ISC","bugs":{"url":"https://github.com/wetterben/vector2d/issues"},"homepage":"https://github.com/wetterben/vector2d#readme","devDependencies":{"@types/node":"^14.0.13","typedoc":"^0.17.8","typescript":"^3.8.3"},"gitHead":"524ce62dad3dd561bd861c01e6f5f8ae7ad40d52","_id":"2dv@1.0.2","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-fopvjWMpIFsaGJm9AeFgC0lMJH5HjCSMNnCHiP1aD/T7wua9oX+7IgeBG1YBXrBHj68b3Rr7UWm6e10ljZW2HA==","shasum":"98ca665ea2196c54efd256f67a545dcece530458","tarball":"https://registry.npmjs.org/2dv/-/2dv-1.0.2.tgz","fileCount":4,"unpackedSize":14275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBcSpCRA9TVsSAnZWagAA9CIP/2QKOfPuRrYJ3aNEDYTF\nsznmRVBFp1eCWCE8++/1Qg5kaiu/jvvgbgMqnlJ1jFL57ondFOkzIdeUaUOQ\nyHoda6WVmz7YY1SSPlVCR8HU9aNwVtfdlwga68kyQXfaOU2k7QvHdY39FfoQ\nhOIyzDED5LaO6STCFZNMhbD5GwMyi9u+o46c5HE5thRe4vTvnZK6JzFMp2SB\nSKYUa/KNF5y/NBonLKVTQG+6g4lE2uRSkD6BwUCPgYkBZLZn1Ij60YHto46Q\nraijjPxQ6reqkHpyLozXe4JqPXWePhczzoWRZCJeESGJsLkL2r5dVwn7W/Oq\nSiuRBOyCo3LZNwb/8JhBLBg45qOl8ZjyHCGxgmAWSU2nNhydVwzra/gR1jsG\nH1dHlLgFh3sZElTkwTGZD7VF+gPffQ2x05j00S1wM7/h3EvbXtCe9AAYKkAg\nC2bfouKdX1WEQ4qd0QKrv4ctYz9g9Gv5Ld5u5ZPLPOMwIkQzyLSssoWXcEka\nUVJbur3V8yTkfoA1UpFBIMeFh+LaLco9N+R2PUD+h5m7c+6DmUMlw3T7LnTc\ndDkiqpBSBDzv5J98VNcL1gkcolghin0T+E51XAw/TMghztLS0u9SNRepTkp7\nZlmDfxBZMdJdQzEGqBSpU1NvVNeXjqPG+pub7XWa9Uj8V0etskRgzSJchrKJ\nIs64\r\n=iaC7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsXYs1nBGudPTo0y/tuGwhEcU6cXj7rwltMJYWK6u9GAiEAlfEWbd5ATG1RW5BavagIA1o8/RRI6RWzNq4P3fPD9x4="}]},"maintainers":[{"name":"wetterben","email":"ben@wettergifhorn.de"}],"_npmUser":{"name":"wetterben","email":"ben@wettergifhorn.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2dv_1.0.2_1594213545263_0.24217852035050358"},"_hasShrinkwrap":false},"1.0.3":{"name":"2dv","version":"1.0.3","description":"Very useful small class to perform vector calculations. Very practical as basis for all kinds of simulations and games where objects move through a two-dimensional space. ","main":"lib/index.js","types":"lib/index.d.ts","keywords":["vector","vector math","javascript","typescript"],"scripts":{"build":"tsc","docs":"typedoc --out docs src","publish":"np --no-2fa"},"repository":{"type":"git","url":"git+https://github.com/wetterben/vector2d.git"},"author":{"name":"Ben Weber"},"license":"ISC","bugs":{"url":"https://github.com/wetterben/vector2d/issues"},"homepage":"https://github.com/wetterben/vector2d#readme","devDependencies":{"@types/node":"^14.0.13","typedoc":"^0.17.8","typescript":"^3.8.3"},"gitHead":"20127fc4dc7002f96cddd42541cc0b5754a69b2e","_id":"2dv@1.0.3","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-mY+rQ1BwpTYcVNMw/tnm6DPs012dXzoVCUWvdGA3VJECQGpIRymbToNZxb4Euv5X2ZzH2iRQVFnwo9dEsqvKjg==","shasum":"dffe7dbf3a9c4455049e296f9d8667e08967a12e","tarball":"https://registry.npmjs.org/2dv/-/2dv-1.0.3.tgz","fileCount":4,"unpackedSize":14229,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBcmQCRA9TVsSAnZWagAAOdwQAIeNzQbtxFj4hyKKQlGB\nOy3nRRK5Bpr56SZSIDycS3b10StPUxxfV6fIVCCkBIGWJh63Tw2cEIjZlU4w\nAqeyHbYJy9CUD7bJzt1ORTZ9tx5HlpmNdA6ytjWBCMtJI7sr0HdQMWYJen35\ncp4tC0W8gyu3SiJX9Y1qNCH1b9Vi+UcQqbhExL+c9fslVFwzn4ETzqUn2XWT\nVOgTdMAStxGw2Jvaye9FqJxm6/3yjbWtmK4BuCGczrvcN1TU7YdrmEFpKbOj\nF9318uzSARKq9gBnobIILqLNb1MlPO89LepUgR1ZS62I7m37fnzla+FON0SI\nWGauhG19C3NTEXSrHlPfeQyIjTgoWs3EJFXZpjwqrNxtTA5w2khAti9dPCGT\nLDKPw3RoggmAx9AKtk1ojPryEnVkkh5Nv0I0HIYHV2UN0osRtow7h9XKxYQw\nf+mXNrW7BHMaZbY7nDNoqSBY/2+0l39RwDm1rXgdnSvXaPpg8z9IoiofI02X\nZ/ZpaiT3qE7NE+2Zo3nDfisLarFimGMS6rLn6l3kIsYNXc6wkmWEBSbCuSC8\n0oIwXNTjEaBnPGHAFOjeFNcDPnKhgcNd5HnG/q5wzgUexN5fP5sujtFVKmdG\nroQw6NR4d+A0MinYq2YONAXnSfL0g8hnni9Hq1ZnxGMPfpdl+FmUoGThWRmT\nR0J6\r\n=iBbJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICkGoX4K/JBTNb2Y8z96t2258zUPpOBclSZIZnwxmtjfAiASRsm2oxIgBI++x7MjQOVoy2FWHPNnviz9dTy2s/uFww=="}]},"maintainers":[{"name":"wetterben","email":"ben@wettergifhorn.de"}],"_npmUser":{"name":"wetterben","email":"ben@wettergifhorn.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2dv_1.0.3_1594214800436_0.66354708575011"},"_hasShrinkwrap":false}},"time":{"created":"2020-07-08T13:02:45.280Z","1.0.1":"2020-07-08T13:02:45.409Z","modified":"2022-04-04T10:19:05.650Z","1.0.2":"2020-07-08T13:05:45.428Z","1.0.3":"2020-07-08T13:26:40.549Z"},"maintainers":[{"name":"wetterben","email":"ben@wettergifhorn.de"}],"description":"Very useful small class to perform vector calculations. Very practical as basis for all kinds of simulations and games where objects move through a two-dimensional space. ","homepage":"https://github.com/wetterben/vector2d#readme","keywords":["vector","vector math","javascript","typescript"],"repository":{"type":"git","url":"git+https://github.com/wetterben/vector2d.git"},"author":{"name":"Ben Weber"},"bugs":{"url":"https://github.com/wetterben/vector2d/issues"},"license":"ISC","readme":"# 2dv — Vector calculation package written in TypeScript\n\n![build](https://github.com/wetterben/2dv/workflows/build/badge.svg)\n![npm](https://img.shields.io/npm/v/2dv)\n\nVery useful small class to perform vector calculations. Very practical as basis for all kinds of simulations and games where objects move through a two-dimensional space.\n\n## Get started\n\n```\nnpm i 2dv\n```\n\nUse in your JavaScript/Typescript project\n\n```js\nimport { Vector } from '2dv';\n// OR\nconst { Vector } = require('2dv');\n\nconst myVector = new Vector(10, 20);\n\nmyVector.add(100);\n…\n\nconst newVector = Vector.add(myVector, 10);\n…\n\n```\n\n## Overview\n\nDetailed documentation: [https://wetterben.github.io/2dv/](https://wetterben.github.io/2dv/classes/_index_.vector.html)\n\n### Properties\n\n- x\n- y\n\n### Accessors\n\n- angle\n- length\n- magnitude\n- max\n- min\n\n### Methods\n\n#### Instance\n\n- add\n- angleTo\n- clone\n- crossProduct\n- divide\n- dotProduct\n- equals\n- inverse\n- multiply\n- normalize\n- set\n- sub\n- toArray\n\n#### Static\n\n- add\n- angleBetween\n- closestPointBetween\n- crossProduct\n- distance\n- divide\n- dotProduct\n- equals\n- fromArray\n- inverse\n- isOnLine\n- multiply\n- normalize\n- pointBetween\n- sub\n\n## Documentation\n\nYou can find a detailed documentation of all methods here:\n[https://wetterben.github.io/2dv/](https://wetterben.github.io/2dv/classes/_index_.vector.html)\n\n## Roadmap\n\n- [ ] Automated tests\n- [ ] Visual Demo\n- [ ] More methods\n\n## Contribute\n\nFeel free to add missing functions or fix things. Just do a PR.\n","readmeFilename":"README.md"}