magic constant

This commit is contained in:
danya
2021-04-06 16:42:17 +03:00
parent f6e2e91a4d
commit f03e7cf2a9
3 changed files with 12 additions and 11 deletions

View File

@ -11,7 +11,7 @@ std::vector<Point> drawCircle1(int n, double cx, double cy, double r) {
std::vector<Point> res;
for (int i = 0; i < n; i++) {
double x = cx + r * cos(i * 8 * atan(1) / n);
double y = cy + r * sin(i * 8 * atan(1) / n);
double y = cy + r * sin(i * 8 * atan(1) / n);
res.push_back({x, y});
}
return res;