Mathlib round corrections
This commit is contained in:
@@ -137,8 +137,8 @@ add $player.xpos 10 &player.xpos
|
||||
|
||||
@endMovement
|
||||
|
||||
pusharg $player.xpos $player.ypos 20 20 0 255 255
|
||||
!grogs:drawRect &out
|
||||
pusharg $player.xpos $player.ypos 20 0 255 255
|
||||
!grogs:drawCircle &out
|
||||
|
||||
!grogs:renderFrame &out
|
||||
!grogs:clearRenderer &out
|
||||
|
||||
@@ -30,17 +30,17 @@ GroundValue modVal(GroundValue* args, int arg_count) {
|
||||
|
||||
GroundValue floorVal(GroundValue* args, int arg_count) {
|
||||
VALIDATE_ARGS_1(GROUND_DOUBLE);
|
||||
return GROUND_DOUBLE_VAL(floor(GET_DOUBLE(args[0])));
|
||||
return GROUND_INT_VAL(int(floor(GET_DOUBLE(args[0]))));
|
||||
}
|
||||
|
||||
GroundValue ceilVal(GroundValue* args, int arg_count) {
|
||||
VALIDATE_ARGS_1(GROUND_DOUBLE);
|
||||
return GROUND_DOUBLE_VAL(ceil(GET_DOUBLE(args[0])));
|
||||
return GROUND_INT_VAL(int(ceil(GET_DOUBLE(args[0]))));
|
||||
}
|
||||
|
||||
GroundValue roundVal(GroundValue* args, int arg_count) {
|
||||
VALIDATE_ARGS_1(GROUND_DOUBLE);
|
||||
return GROUND_DOUBLE_VAL(round(GET_DOUBLE(args[0])));
|
||||
return GROUND_INT_VAL(int(round(GET_DOUBLE(args[0]))));
|
||||
}
|
||||
|
||||
GroundValue randomInt(GroundValue* args, int arg_count) {
|
||||
|
||||
BIN
math/math.so
Executable file
BIN
math/math.so
Executable file
Binary file not shown.
Reference in New Issue
Block a user