Add *.bak and *.autosave.map (generated by Radiant) to .gitignore
Fix casts in math macros not applying to the entire parameter
Eliminate double promotion in a bunch of computations

(Does this really matter? Probably not.)
Enable -Wshadow and fix instances of shadowed variables