Hi, I was trying to solve this problem : http://livearchive.onlinejudge.org/index.php?option=onlinejudge&Itemid=99999999&page=show_problem&category=&problem=2065
However I get TLE, the complexity of my algorithm is O(n^2 lg n) which I think is enough. So I was wondering if using atan2 to order points by polar angle is slow?
Code : http://pastie.org/3105825
Code: http://pastie.org/3110758
Atan2 doesn't call cos and sin. It calls atan, sqrt and division.