https://drive.google.com/file/d/0B8g97JkuSSBwUENiWTJXeGtTOHF...
Here's the source from those slides (I don't know who put it there).
http://codepad.org/ZWbF9yrY
I had to remove these two lines to make it compile.
double M_PI = 3.14159265358979; double M_1_PI = 1.0/M_PI;
Link here: http://codepad.org/fpp2inpr