Small change required for compilation on llvm

Got an ambiguous call to abs when compiling with Xcode - corrected this by forcing the type to float (abs either takes double or float)

Somehow messed up the push so there are 2 commits for the same change!