mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-05 08:44:07 +00:00
atan2 function in parser
This commit is contained in:
parent
0e09775669
commit
937a291485
7
util.cpp
7
util.cpp
@ -236,6 +236,13 @@ cld exp_parser::parse(int prio) {
|
|||||||
force_eat(")");
|
force_eat(")");
|
||||||
res = a;
|
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(")) {
|
else if(eat("edge(")) {
|
||||||
ld a = rparse(0);
|
ld a = rparse(0);
|
||||||
force_eat(",");
|
force_eat(",");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user