[Corrected]Distance with casting Math.sqrt(), Point.distance() methods

added vector casting, switched i++ to ++i, and rearranged test code as getTimer results were made false with original code