mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-26 07:02:49 +00:00
parser:: removed exceptions in arcmedge since they might not work correctly with conditionals
This commit is contained in:
parent
89efe24c2d
commit
d82ac26ef0
2
util.cpp
2
util.cpp
@ -257,11 +257,9 @@ cld exp_parser::parse(int prio) {
|
|||||||
}
|
}
|
||||||
#if CAP_ARCM
|
#if CAP_ARCM
|
||||||
else if(eat("arcmedge(")) {
|
else if(eat("arcmedge(")) {
|
||||||
if(!hyperbolic && !sphere && !euclid) throw hr_parse_exception("arcmedge works only in isotropic geometry");
|
|
||||||
vector<pair<ld, ld>> vals = parse_with_reps();
|
vector<pair<ld, ld>> vals = parse_with_reps();
|
||||||
force_eat(")");
|
force_eat(")");
|
||||||
res = euclid ? 1 : arcm::compute_edgelength(vals);
|
res = euclid ? 1 : arcm::compute_edgelength(vals);
|
||||||
if(real(res) < 1e-10) throw hr_parse_exception("wrong geometry for this arcmedge");
|
|
||||||
if (auto *distunit = hr::at_or_null(extra_params, "distunit"))
|
if (auto *distunit = hr::at_or_null(extra_params, "distunit"))
|
||||||
res /= *distunit;
|
res /= *distunit;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user