refactor(lang): rename builtins flr->floor and fx->fixed
De-abbreviate the two bare fixed-point conversion builtins:
flr(f) -> int -> floor(f) -> int (fixed -> int, flooring)
fx(i) -> fixed -> fixed(i) -> fixed (int -> fixed; mirrors how the
stringify builtin is `string`)
Updates the compiler dispatch, all call sites, the grammars/LSP/JetBrains
tokens, and the docs (fn-flr -> fn-floor, fn-fx -> fn-fixed). Reseeded;
C-free fixpoint holds; all suites green (45/24/29); site + check.py OK.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
effb3f637f
commit
2e0047514b
19 changed files with 80 additions and 80 deletions
|
|
@ -1269,7 +1269,7 @@ system Generate phase Update {
|
|||
for bp in pending_chunks() {
|
||||
manip vm = Map.borrow_chunk(bp)
|
||||
for p in vm.area {
|
||||
let h = flr(noise2d(fx(p.x) / 64.0, fx(p.z) / 64.0) * 24.0) + 8
|
||||
let h = floor(noise2d(fixed(p.x) / 64.0, fixed(p.z) / 64.0) * 24.0) + 8
|
||||
vm[p] = if p.y <= h { NODE_STONE } else { NODE_AIR }
|
||||
}
|
||||
vm.commit()
|
||||
|
|
@ -1436,7 +1436,7 @@ game Voxel {
|
|||
manip vm = Map.stage(bp)
|
||||
for p in vm.area {
|
||||
let n = noise2d(p.x as f32 / 64.0, p.z as f32 / 64.0, seed())
|
||||
let h = flr(n * 24.0) + 8
|
||||
let h = floor(n * 24.0) + 8
|
||||
vm[p] = if p.y > h { NODE_AIR }
|
||||
else if p.y == h { NODE_GRASS }
|
||||
else { NODE_STONE }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue