Update arc.js

while investigating why some arcs fails, reduced the number of calls to math.sin and math.cos, not by that much.