Corrected faulty division to use floats.

I realised I introduced a bug when I tidied the sandbox code because I hadn't kept the float precision.