1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

edge_angles function

This commit is contained in:
Zeno Rogue 2020-05-31 03:26:27 +02:00
parent 18d4165f64
commit 01caa6316f

View File

@ -240,6 +240,23 @@ cld exp_parser::parse(int prio) {
force_eat(")");
res = edge_of_triangle_with_angles(2*M_PI/a, M_PI/b, M_PI/b);
}
else if(eat("edge_angles(")) {
cld a = rparse(0);
force_eat(",");
cld b = rparse(0);
force_eat(",");
cld c = rparse(0);
force_eat(")");
if(extra_params.count("angleunit")) {
a *= extra_params["angleunit"];
b *= extra_params["angleunit"];
c *= extra_params["angleunit"];
}
return edge_of_triangle_with_angles(real(a), real(b), real(c));
}
else if(eat("regradius(")) {
ld a = rparse(0);
force_eat(",");