#pragma once

namespace torlinkc::ui {

// Modulo-wraparound stepping for cursor movement. Ported from ui/move.ts.
int wrapStep(int current, int delta, int length);

// Scrolling-viewport start index that keeps `cursor` centered, clamped to
// bounds. Ported from ui/move.ts.
int windowStart(int cursor, int total, int height);

}  // namespace torlinkc::ui
