Skip to content

Instantly share code, notes, and snippets.

Working from home

NostraDavid NostraDavid

Working from home
View GitHub Profile
NostraDavid / invsqrt.c
Created Dec 30, 2020
Inverse Square Root by Greg Walsh
View invsqrt.c
float invSqrt(float x)
union {
float x;
int i;
} u;
float xhalf = 0.5f * x;
u.x = x;
u.i = 0x5f3759df - (u.i >> 1);
NostraDavid /
Last active Nov 25, 2020, but its based on kleur.lua
import doctest
def kleur(h: float):
This is a hue function that converts a float in the range of [0-1] to a string
Behold! The Doctest!
>>> kleur(0.598)
View WHATWG index.html
<!-- This is a collection of HTML used in the HTML (5) Standard: -->
<!DOCTYPE html>
<html lang=en>
<title>Test document</title>
<base href= target=_self />
<!-- target="_blank|_self|_parent|_top|framename -->
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1.0">

Keybase proof

I hereby claim:

  • I am NostraDavid on github.
  • I am nostradavid ( on keybase.
  • I have a public key whose fingerprint is 5AEA 91DF 666B 3268 4241 D4DC FC33 A3D8 FF8D D06F

To claim this, I am signing this object: