Feat: tri is now triangle (disambiguation)

This commit is contained in:
2026-02-04 20:34:37 +01:00
parent d40d713649
commit e6f776bdf4
4 changed files with 6 additions and 5 deletions

View File

@@ -852,7 +852,7 @@ impl Forth {
let val = phase.powf(curve);
stack.push(Value::Float(val, None));
}
Op::Tri => {
Op::Triangle => {
let freq = stack.pop().ok_or("stack underflow")?.as_float()?;
let phase = (freq * ctx.beat).fract();
let phase = if phase < 0.0 { phase + 1.0 } else { phase };