rsqrt
never use this
Quake style 1.0/sqrt. DO NOT USE
npm install rsqrt
Want to see pretty graphs? Log in now!
5 | downloads in the last month |
Last Published By | |
---|---|
Version | 0.0.0 last updated a year ago |
License | MIT |
Keywords | sqrt, reciprocal, quake, fast, inverse, square, root, rsqrt |
Repository | git://github.com/mikolalysenko/rsqrt.git (git) |
Dependencies | almost-equal |
Dependents | mikolalysenko-hoarders |
rsqrt
An attempt to port Quake's fast inverse square root to JS. Do not ever use this.
Install:
npm install rsqrt
Example:
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