Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/rsqrt
Quake style 1.0/sqrt(x)
https://github.com/mikolalysenko/rsqrt
Last synced: 6 days ago
JSON representation
Quake style 1.0/sqrt(x)
- Host: GitHub
- URL: https://github.com/mikolalysenko/rsqrt
- Owner: mikolalysenko
- License: mit
- Created: 2013-04-04T16:31:42.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-05-14T00:13:30.000Z (over 11 years ago)
- Last Synced: 2024-12-16T22:35:36.831Z (9 days ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
rsqrt
=====
An attempt to port [Quake's fast inverse square root](http://en.wikipedia.org/wiki/Fast_inverse_square_root) to JS. Do not ever use this.## Install:
npm install rsqrt
## Example:
```javascript
console.log(require("rsqrt")(100.0)) //Prints out approximately 0.1
```## `require("rsqrt")(number)`
Computes an approximation for `1.0 / Math.sqrt(number)`## Should I ever use this?
No. `1.0 / Math.sqrt` is at least twice as fast.
## Why did you publish this?
To warn others.
## Credits
(c) 2013 Mikola Lysenko. MIT License