refactor(tracker): use built-in min & max instead of intMin & intMax

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-10-18 23:43:27 +03:00
parent 0ba6557f65
commit 1c42a51cc6
11 changed files with 58 additions and 72 deletions

View File

@ -67,7 +67,7 @@ func (p parameter) change(kind string) func() {
func (pl *Params) List() List { return List{pl} }
func (pl *Params) Selected() int { return pl.d.ParamIndex }
func (pl *Params) Selected2() int { return pl.Selected() }
func (pl *Params) SetSelected(value int) { pl.d.ParamIndex = intMax(intMin(value, pl.Count()-1), 0) }
func (pl *Params) SetSelected(value int) { pl.d.ParamIndex = max(min(value, pl.Count()-1), 0) }
func (pl *Params) SetSelected2(value int) {}
func (pl *Params) cancel() { (*Model)(pl).changeCancel = true }