Skip to content

Commit 260b462

Browse files
committed
Update mario_game generated test code
1 parent 69a21e0 commit 260b462

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/tests/src/mario_game.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import * as Belt_List from "rescript/lib/es6/Belt_List.js";
44
import * as Pervasives from "rescript/lib/es6/Pervasives.js";
55
import * as Primitive_int from "rescript/lib/es6/Primitive_int.js";
6-
import * as Primitive_bool from "rescript/lib/es6/Primitive_bool.js";
76
import * as Primitive_float from "rescript/lib/es6/Primitive_float.js";
87
import * as Primitive_object from "rescript/lib/es6/Primitive_object.js";
98
import * as Primitive_option from "rescript/lib/es6/Primitive_option.js";
@@ -979,7 +978,7 @@ function update_player(player, keys, context) {
979978
if (!player.jumping && player.grounded) {
980979
player.jumping = true;
981980
player.grounded = false;
982-
player.vel.y = Primitive_bool.max(player.vel.y - (5.7 + Math.abs(player.vel.x) * 0.25), -6);
981+
player.vel.y = Primitive_float.max(player.vel.y - (5.7 + Math.abs(player.vel.x) * 0.25), -6);
983982
return;
984983
} else {
985984
return;
@@ -1531,7 +1530,7 @@ function make$3(param, param$1) {
15311530

15321531
function calc_viewport_point(cc, vc, mc) {
15331532
let vc_half = vc / 2;
1534-
return Primitive_float.min(Primitive_bool.max(cc - vc_half, 0), Primitive_float.min(mc - vc, Math.abs(cc - vc_half)));
1533+
return Primitive_float.min(Primitive_float.max(cc - vc_half, 0), Primitive_float.min(mc - vc, Math.abs(cc - vc_half)));
15351534
}
15361535

15371536
function in_viewport(v, pos) {

0 commit comments

Comments
 (0)