Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

atan2 是标准库的辐角,范围-pi~pi

Posted by Shinjikun at 2010-11-01 13:02:04 on Problem 1675
如果要0~2Pi就是
double calc(int x, int y) {
	double atan = atan2(y, x);
	if (atan < 0) {
		atan += 3.1415926535897932384626 * 2;
	}
	return atan;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator