dx1*=2;dx2*=2;dy1*=2;dy2*=2;
Although it has accuracy issues when you get too fast...
Reply on news.ycombinator.com