GSoC10 work. Cheers Mike for catching this! Also removing the use of sqrt() as noted in a "todo" comment there...