diff --git a/c2logic/consts.py b/c2logic/consts.py index bb09834..c59805d 100644 --- a/c2logic/consts.py +++ b/c2logic/consts.py @@ -27,11 +27,11 @@ condition_ops = { ">=": "greaterThanEq" } #TODO remove negate b/c its deprecated -unary_ops = {"-": "negate", "~": "not"} +unary_ops = {"~": "not"} binary_op_inverses = {"==": "!=", "!=": "==", "<": ">=", "<=": ">", ">": "<=", ">=": "<"} -func_binary_ops = ["pow", "max", "min", "atan2", "dst"] +func_binary_ops = ["pow", "max", "min", "angle", "len", "land", "idiv", "strictEqual", "noise"] func_unary_ops = ["abs", "log", "log10", "sin", "cos", "tan", "floor", "ceil", "sqrt", "rand"] binary_ops.update(dict(zip(func_binary_ops, func_binary_ops))) unary_ops.update(dict(zip(func_unary_ops, func_unary_ops))) diff --git a/include/builtins.h b/include/builtins.h index 35f76cd..2af3794 100644 --- a/include/builtins.h +++ b/include/builtins.h @@ -30,11 +30,15 @@ void drawflush(struct MindustryObject display); void end(); // builtin binary operators +double strictEqual(double x, double y); +double idiv(double x, double y); double pow(double x, double y); +double land(double x, double y); double max(double x, double y); double min(double x, double y); -double atan2(double x, double y); -double dst(double x, double y); +double angle(double x, double y); +double len(double x, double y); +double noise(double x, double y); // builtin unary operators double abs(double x); double log(double x); @@ -46,4 +50,4 @@ double floor(double x); double ceil(double x); double sqrt(double x); double rand(double x); -#endif \ No newline at end of file +#endif