Skip to content

Instantly share code, notes, and snippets.

@GinjaNinja32
GinjaNinja32 / gist:5747d5b497f74c725982
Created July 9, 2015 15:08
cheap_pythag() vs sqrt()
/world
loop_checks = 0
//A very crude linear approximatiaon of pythagoras theorem.
/proc/cheap_pythag(var/dx, var/dy)
dx = abs(dx); dy = abs(dy);
if(dx>=dy) return dx + (0.5*dy) //The longest side add half the shortest side approximates the hypotenuse
else return dy + (0.5*dx)
/proc/test_cheappythag(n)
@GinjaNinja32
GinjaNinja32 / keybase.md
Created November 26, 2015 00:26
Keybase

Keybase proof

I hereby claim:

  • I am ginjaninja32 on github.
  • I am ginjaninja32 (https://keybase.io/ginjaninja32) on keybase.
  • I have a public key whose fingerprint is 8A8A 3213 DAAC 9659 CF86 CF84 0B30 BA1D 77CF 8D8B

To claim this, I am signing this object: