Move some math calculations to Obj-C (really C macros) and force primiti...

...ve types for constants.