summaryrefslogtreecommitdiff
path: root/test/geometry/circle.cpp
diff options
context:
space:
mode:
authorGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 21:17:29 +0100
committerGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 21:17:29 +0100
commit1880ccb6d85c6eb79e724593457877bab431951c (patch)
tree23eddd5bd0b29b3024e170a5ef9023eda9226ab5 /test/geometry/circle.cpp
parente95f59debd69ee7d45d5c966ce466d23264e1c3c (diff)
get rid of all() and sz()
Diffstat (limited to 'test/geometry/circle.cpp')
-rw-r--r--test/geometry/circle.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/geometry/circle.cpp b/test/geometry/circle.cpp
index 3d3d27d..dc975ff 100644
--- a/test/geometry/circle.cpp
+++ b/test/geometry/circle.cpp
@@ -46,9 +46,9 @@ void test_circleIntersection(ll range) {
auto got = circleIntersection(c1, r1, c2, r2);
- if (sz(got) != expectedCount(real(c1), imag(c1), r1, real(c2), imag(c2), r2)) cerr << "error: wrong count" << FAIL;
+ if (ssize(got) != expectedCount(real(c1), imag(c1), r1, real(c2), imag(c2), r2)) cerr << "error: wrong count" << FAIL;
- for (int i = 0; i < sz(got); i++) {
+ for (int i = 0; i < ssize(got); i++) {
for (int j = 0; j < i; j++) {
if (abs(got[i] - got[j]) < 1e-6) cerr << "error: identical" << FAIL;
}
@@ -58,7 +58,7 @@ void test_circleIntersection(ll range) {
if (float_error(abs(c1 - p), r1) > 1e-6) cerr << "error: 1" << FAIL;
if (float_error(abs(c2 - p), r2) > 1e-6) cerr << "error: 2" << FAIL;
}
- queries += sz(got);
+ queries += ssize(got);
}
cerr << "tested circleIntersection: " << queries << endl;
}
@@ -91,9 +91,9 @@ void test_circleRayIntersection(ll range) {
else expected = 1;
}
- if (sz(got) != expected) cerr << "error: wrong count" << FAIL;
+ if (ssize(got) != expected) cerr << "error: wrong count" << FAIL;
- for (int i = 0; i < sz(got); i++) {
+ for (int i = 0; i < ssize(got); i++) {
for (int j = 0; j < i; j++) {
if (abs(got[i] - got[j]) < 1e-6) cerr << "error: identical" << FAIL;
}
@@ -103,7 +103,7 @@ void test_circleRayIntersection(ll range) {
if (float_error(abs(c - p), r) > 1e-6) cerr << "error: 1" << FAIL;
if (distToLine(orig, orig + dir, p) > 1e-6) cerr << "error: 2" << FAIL;
}
- queries += sz(got);
+ queries += ssize(got);
}
cerr << "tested circleIntersection: " << queries << endl;
}