dx,dy to double