diff options
| author | Brian Cully <bjc@spork.org> | 2025-12-16 17:54:47 -0500 |
|---|---|---|
| committer | Brian Cully <bjc@spork.org> | 2025-12-16 17:54:47 -0500 |
| commit | 45a2cfca666e5698462090399ff2db13be57a38c (patch) | |
| tree | df0a8d7371d68d88a48ebb2f755f9fbaadb5aa33 /site | |
| parent | 362569ade6de7cb4caf8ddd5e260ff397266c530 (diff) | |
| download | automathon-45a2cfca666e5698462090399ff2db13be57a38c.tar.gz automathon-45a2cfca666e5698462090399ff2db13be57a38c.zip | |
rename velocity to speed
mass is a scalar quantity
Diffstat (limited to 'site')
| -rw-r--r-- | site/main.mjs | 6 | ||||
| -rw-r--r-- | site/samples/rob.fs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/site/main.mjs b/site/main.mjs index 6bd2093..e049dea 100644 --- a/site/main.mjs +++ b/site/main.mjs @@ -61,7 +61,7 @@ function renderVars(vm) { e.removeChild(e.lastChild); } - ['out', 'heading', 'velocity', 'doppler'].forEach(name => { + ['out', 'heading', 'speed', 'doppler'].forEach(name => { const dt = document.createElement('dt'); dt.textContent = name; e.appendChild(dt); @@ -90,11 +90,11 @@ function renderArena(robos) { robos.forEach(robo => { let heading = robo.vm.heading(); - let velocity = robo.vm.velocity(); + let speed = robo.vm.speed(); let [velx, vely] = [ Math.cos(2 * Math.PI * heading / 360), Math.sin(2 * Math.PI * heading / 360) - ].map(x => velocity * x); + ].map(x => speed * x); renderRobo(ctx, robo.x, robo.y); robo.x += velx; diff --git a/site/samples/rob.fs b/site/samples/rob.fs index 2175294..3e24a7d 100644 --- a/site/samples/rob.fs +++ b/site/samples/rob.fs @@ -3,5 +3,5 @@ loop ; -2 setvel +2 setspeed loop |
