diff --git a/devmods/rulegen-tests.cpp b/devmods/rulegen-tests.cpp index cc99eec3..71b8f763 100644 --- a/devmods/rulegen-tests.cpp +++ b/devmods/rulegen-tests.cpp @@ -517,6 +517,18 @@ int shape_edges() { return res; } +int max_edge() { + int res = 0; + for(auto& sh: arb::current.shapes) res = max(res, sh.size()); + return res; + } + +int max_valence() { + int res = 0; + for(auto& sh: arb::current.shapes) for(auto& va: sh.vertex_valence) res = max(res, va); + return res; + } + void test_current(string tesname) { disable_bigstuff = true; @@ -664,12 +676,36 @@ void test_current(string tesname) { vector areas; for(auto& sh: arb::current.shapes) { - ld s = 0; int i = 0; - for(auto a: sh.angles) { while(a > 2 * M_PI) a -= 2 * M_PI; while(a<0) a += 2 * M_PI; s += a; i++; } - areas.push_back((i-2) * M_PI - s); + if(hyperbolic) { + ld s = 0; int i = 0; + for(auto a: sh.angles) { while(a > 2 * M_PI) a -= 2 * M_PI; while(a<0) a += 2 * M_PI; s += a; i++; } + areas.push_back((i-2) * M_PI - s); + } + else { + ld s = 0; + for(int i=0; i edgelens; + for(auto& sh: arb::current.shapes) { + for(int i=0; i