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:
parent
18d4165f64
commit
01caa6316f
17
util.cpp
17
util.cpp
@ -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(",");
|
||||
|
Loading…
Reference in New Issue
Block a user