diff --git a/arbitrile.cpp b/arbitrile.cpp index 83fa63d7..29b1e3b3 100644 --- a/arbitrile.cpp +++ b/arbitrile.cpp @@ -14,6 +14,8 @@ EX namespace arb { EX int affine_limit = 200; +EX bool legacy; /* angleofs command */ + #if HDR struct shape { @@ -151,6 +153,7 @@ void shape::build_from_angles_edges() { int n = isize(angles); hyperpoint ctr = Hypc; vector matrices; + if(!legacy) for(auto& a: angles) a += M_PI; for(int i=0; i 2 * M_PI) result -= 2 * M_PI; if(result > M_PI) result = 2 * M_PI - result; - res = M_PI - result; - - if(extra_params.count("angleofs")) - res -= extra_params["angleofs"]; + + if(arb::legacy) { + res = M_PI - result; + if(extra_params.count("angleofs")) + res -= extra_params["angleofs"]; + } + else + res = result; if(extra_params.count("angleunit")) res /= extra_params["angleunit"];