mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
edge function
This commit is contained in:
parent
7f1f5ccb43
commit
688021ee1c
7
util.cpp
7
util.cpp
@ -210,6 +210,13 @@ cld exp_parser::parse(int prio) {
|
||||
else if(eat("floor(")) res = floor(real(parsepar()));
|
||||
else if(eat("frac(")) { res = parsepar(); res = res - floor(real(res)); }
|
||||
else if(eat("to01(")) { res = parsepar(); return atan(res) / ld(M_PI) + ld(0.5); }
|
||||
else if(eat("edge(")) {
|
||||
cld a = rparse(0);
|
||||
force_eat(",");
|
||||
cld b = rparse(0);
|
||||
force_eat(")");
|
||||
return edge_of_triangle_with_angles(2*M_PI/real(a), M_PI/real(b), M_PI/real(b));
|
||||
}
|
||||
else if(eat("ifp(")) {
|
||||
cld cond = parse(0);
|
||||
force_eat(",");
|
||||
|
Loading…
Reference in New Issue
Block a user