{"_id":"to-float32","_rev":"5-5af779d1d25a94f5c4aa73789ad0dd56","name":"to-float32","description":"Convert data to float32 array or get float32 fractions","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"to-float32","version":"1.0.0","description":"Convert data to float32 array or get float32 fractions","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/dfcreative/to-float32.git"},"keywords":["float32","fract32","webgl"],"author":{"name":"Dmitry Yv.","email":"dfcreative@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dfcreative/to-float32/issues"},"homepage":"https://github.com/dfcreative/to-float32#readme","dependencies":{},"gitHead":"a1bf910337a95cc966e7a0af931ae218679df223","_id":"to-float32@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.1.2","_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"dist":{"integrity":"sha512-AtYAqiHS1q+IqVfZOExaRC72mUZuMZP7yU1xsR07y0SLLEvPf68R+xGfya3eY4CR7jxT/zQt3wM8w4mGq/mPXA==","shasum":"32a310fe2fb7d49459037b1d47447ce5b2d5ac95","tarball":"https://registry.npmjs.org/to-float32/-/to-float32-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDORjfzIUdbFDTEeJG0+JixIiGdSX/fDhHHTmZmq5kfLgIhAMjAmMDQzKux9x0kwOsNHGDOoI8PZOBKx7VbmyQzK1n+"}]},"maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-float32-1.0.0.tgz_1512084197446_0.6420299187302589"},"directories":{}},"1.0.1":{"name":"to-float32","version":"1.0.1","description":"Convert data to float32 array or get float32 fractions","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/dy/to-float32.git"},"keywords":["float32","fract32","webgl"],"author":{"name":"Dmitry Yv.","email":"dfcreative@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dy/to-float32/issues"},"homepage":"https://github.com/dy/to-float32#readme","dependencies":{},"gitHead":"28146b7f9670c45895d134ef9c08f9cf2c95a413","_id":"to-float32@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.11.1","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"dist":{"integrity":"sha512-nOy2WSwae3xhZbc+05xiCuU3ZPPmH0L4Rg4Q1qiOGFSuNSCTB9nVJaGgGl3ZScxAclX/L8hJuDHJGDAzbfuKCQ==","shasum":"22d5921f38183164b9e7e9876158c0c16cb9753a","tarball":"https://registry.npmjs.org/to-float32/-/to-float32-1.0.1.tgz","fileCount":6,"unpackedSize":4955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8JJrCRA9TVsSAnZWagAAhs0QAJtc9bZDb0KlGb+RWqXI\n47Im1MfxOLYChFXvwpwRUBDgF4UQ2Cp1InVdru7+8BYq7WEnMsEtYO+o2Nlv\noVLyKvg9JajnjdbH7x2fNA6ZJ5ZDTRamJERh+m5mcfRQrIZWbjfUU9YPSY1B\nxqpV+meMi8xt080FwPTOKqgDlr3vSqZi2WTQiX6Gz6a/0TohneFlA4uZ82ZH\nqkT6+ulBngYyaKA07SBEYgkyhSNMfFKGVzDtCeLoZz6Ymp+TajTd1SiMGYBT\nu+gjyxQcnO5kZxf9KIrdoCCwvB9cWh38unwh4hZ8MdTjRAWsEhGgFZzFvXMn\ndmktL9gs/g7XoMHLmKSnKOdSq3yd40IjyT4QMzdshUpy73UCB6iLG+nbZnVz\n1kZ2b0gV2rG0qIgcYlMPIkbgde0RM+70AI5S03fPBwrs6u/OcN99PI5p+Azh\nyJSw4UsAqazEIKR96Ur0xE/7ZNiM1m0GBphvIZuVa5NcFqQnG6B03PbmopJV\nWDGcYl9Y6HgOThjY7+xRalwfXH1Kw6CBQmDagtuCWicJDeU2X3dcAQBQcCw+\nBiK9761z66DrEtLGMm9JXnVF8K31UmPj6IQBsCp1Kd4SF8xQCPdDxltTW6+S\ngRVcqkI+aonmCCBa1QVAeUzLZ6UKIv1zVjKIRmH1Jl3IvlY96i8iQAc95MDX\nySsJ\r\n=57Lk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClLEvht6+Tp2LgjhD9AiK7cRT0TMv0XkFQeoefzAiibQIhAPMPl4V2NY31o+jBy0ZBQy0r0MRSsDVebnuAVzl7fdV3"}]},"maintainers":[{"email":"df.creative@gmail.com","name":"dy"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-float32_1.0.1_1542492778930_0.596840171875183"},"_hasShrinkwrap":false},"1.1.0":{"name":"to-float32","version":"1.1.0","description":"Convert data to float32 array or get float32 fractions","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/dy/to-float32.git"},"keywords":["float32","fract32","webgl"],"author":{"name":"Dmitry Yv.","email":"dfcreative@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dy/to-float32/issues"},"homepage":"https://github.com/dy/to-float32#readme","dependencies":{},"gitHead":"7817b079869c009342d6ad27178195c8658c33a2","_id":"to-float32@1.1.0","_nodeVersion":"14.3.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-keDnAusn/vc+R3iEiSDw8TOF7gPiTLdK1ArvWtYbJQiVfmRg6i/CAvbKq3uIS0vWroAC7ZecN3DjQKw3aSklUg==","shasum":"39bd3b11eadccd490c08f5f9171da5127b6f3946","tarball":"https://registry.npmjs.org/to-float32/-/to-float32-1.1.0.tgz","fileCount":7,"unpackedSize":5462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkqeTCRA9TVsSAnZWagAApVIP/0Gh9T+Lh5x54Uyda3gv\n5BtPxJ7DrtZzsFj4s/2nzSJOY2Jicl9taY6M2cEIR0ybOcSuvi/xXvPsKd2D\nZQN8iqGOrK1OuJL0/xn6uIPyKyI9vUnboKkH9kR4W/R7Rk6yXhzot5k9Hl/c\nZOHSWtKV14MG7qyZzDtI0/bEc8lMzHD1mHZVcvWl6Bj0eEqgNYtbRIoQtnWX\naoFbtLHb2KMQfHwJ4LURTyYeyxzCXvflnEbpolSCnpZnn2Ml7GtKkoU6zmYV\n2jyQ74unDsexUoHAglq/UJ+ynUt1zcN104ta9I4JNbRlYqM7g7asKdq+k2lB\nViQNOkISTSufB9er+gCNDlFwogcX23FGoIS12KjQRhjtIhz5g3LmD9tgHlSj\nCgyOATLDvOPfqEzzWCUsmN9Ls9+IZsP5+4R5Et0W8ifFV6NMsyr6VvqAm3Er\nu0EBkVHcqT90M6J5hIBCpHzfdz+Z+An+DDNLbQ0NgC76ZDxZgXDOB7c4rPP5\naj44nrMzL/s70a/EXmJNopTFkwiaUeXA4+qy8BTY/2BFhwuSoXm7l1Uq06hs\n446aB5Lr0oupBS9Rk9Cm8tasA8mkKscSKg27YxSXTO55fliVBPpLwlp7J/xa\nNe70BTGqmj69gIaxummhlgdIZlLxXk5PyfFAWqE+Z0AvwI/Ft1oQQgLFuhUb\nQEF3\r\n=Bn10\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEsxppBKrtwDoPa75czl8iXx4ixLyBwLYqIhgNrsfn8PAiEA1QO79Xo2/76XtjPh5iGiRFkz8Is626NpXKC+G89v4x4="}]},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"dy","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-float32_1.1.0_1620223891398_0.687244744401631"},"_hasShrinkwrap":false}},"readme":"# to-float32 [![unstable](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges) [![Build Status](https://travis-ci.org/dy/to-uint8.svg?branch=master)](https://travis-ci.org/dy/to-uint8)\r\n\r\nDirty little helper to convert array to float32 array or return round remainder of converting to float32. Useful for sending data to webgl buffers.\r\n\r\n[![npm install to-float32](https://nodei.co/npm/to-float32.png?mini=true)](https://npmjs.org/package/to-float32/)\r\n\r\n```js\r\nlet {float32, fract32} = require('to-float32')\r\n\r\nlet data = Array.from({length: 1024}, Math.random)\r\n\r\n// create float32 data\r\nlet buffer = float(data)\r\n\r\n// get float32 remainders\r\nlet fractBuffer = fract32(data)\r\n\r\n// convert number to float32\r\nlet f32 = float32(0.1) // 0.10000000149011612\r\n\r\n// get float32 number remainder\r\nlet rem32 = fract32(0.1) //\r\n```\r\n\r\nFract data is _Float32Array_ with values calculated as `origValue - float32value`\r\n\r\n## License\r\n\r\n(c) 2017 Dmitry Yv. MIT License\r\n","maintainers":[{"name":"dy","email":"df.creative@gmail.com"}],"time":{"modified":"2022-05-21T23:55:29.146Z","created":"2017-11-30T23:23:17.544Z","1.0.0":"2017-11-30T23:23:17.544Z","1.0.1":"2018-11-17T22:12:59.060Z","1.1.0":"2021-05-05T14:11:31.596Z"},"homepage":"https://github.com/dy/to-float32#readme","keywords":["float32","fract32","webgl"],"repository":{"type":"git","url":"git+https://github.com/dy/to-float32.git"},"author":{"name":"Dmitry Yv.","email":"dfcreative@gmail.com"},"bugs":{"url":"https://github.com/dy/to-float32/issues"},"license":"MIT","readmeFilename":"readme.md"}