1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-19 11:44:48 +00:00

atan2 function in parser

This commit is contained in:
Zeno Rogue 2024-05-27 13:52:52 +02:00
parent 0e09775669
commit 937a291485

View File

@ -236,6 +236,13 @@ cld exp_parser::parse(int prio) {
force_eat(")");
res = a;
}
else if(eat("atan2(")) {
ld y = rparse(0);
force_eat(",");
ld x = rparse(0);
force_eat(")");
res = atan2(y, x);
}
else if(eat("edge(")) {
ld a = rparse(0);
force_eat(",");