Whoops, didnt even notice the ints. Hrm, I tried your optimizations for hyopt and pow, but my method was still faster. Also, I switched everything to double's and my method still ran the same, while, surpisingly, your ran slower. I find that pretty weird, since hypot() and pow() are double functions...