Skip to content

Commit 53a2fda

Browse files
committed
picogame: fix noise comments (no picogame_noise lib; it's canonical C, sim mirrors it)
1 parent bb34d0f commit 53a2fda

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎shared-bindings/picogame/__init__.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ static mp_obj_t picogame_collide(size_t n_args, const mp_obj_t *args) {
10971097
}
10981098
static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(picogame_collide_obj, 6, 8, picogame_collide);
10991099

1100-
// ---- procedural value-noise in C (matches lib/picogame_noise.py's algorithm) ----
1100+
// ---- procedural value-noise in C (the desktop simulator sim/picogame.py mirrors it) ----
11011101
// The CANONICAL implementation is FIXED-POINT (Q16.16 coords, Q0.16 values), exposed
11021102
// under the plain names value2d/value1d/fbm2d/fbm1d (see further down). It benchmarked
11031103
// ~1.8x faster than float on-device (0.649 s vs 1.186 s / 5000 fbm2d), so the float
@@ -1135,7 +1135,7 @@ static float pg_value1d(float x, int32_t seed) {
11351135
}
11361136

11371137
//| def value2d(x: float, y: float, *, seed: int = 0) -> float:
1138-
//| """Smooth 2-D value noise in 0..1 (fast C; same algorithm as picogame_noise)."""
1138+
//| """Smooth 2-D value noise in 0..1 (fast C)."""
11391139
//| ...
11401140
static mp_obj_t picogame_value2d(size_t n_args, const mp_obj_t *pos, mp_map_t *kw) {
11411141
static const mp_arg_t spec[] = { {MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL}},

0 commit comments

Comments
 (0)