Bounded Touch Counter
Enforce minimum and maximum totals.
Tap, click or press Space to keep count.
Tap anywhere inside or press Space
How the Bounded Touch Counter Works
The Bounded Touch Counter keeps the total between a minimum and a maximum, and blocks any tap that would push the total outside those limits. The display flashes when a tap hits a limit.
- Set the minimum: Enter the lowest allowed total, such as 0.
- Set the maximum: Enter the highest allowed total, such as 50 seats.
- Count up and down: Tap plus and minus as normal. The total moves freely between the limits.
- Hit a limit: A tap past the maximum or below the minimum is ignored, and the counter shows a limit warning.
Bounded Touch Counter Formula
The Bounded Touch Counter total equals the requested value clamped between the minimum and the maximum.
- Requested
- Value after applying the tap
- Min
- Lowest allowed total
- Max
- Highest allowed total
Example: Limits are 0 and 40. The total is 38 and the step is 5. The requested value is 43, so the total stays at min(40, max(0, 43)) = 40.
Bounded Touch Counter Reference Table
The Bounded Touch Counter conversion table shows how requested values are clamped with a minimum of 0 and a maximum of 100.
| Current total | Change | Requested value | Stored total |
|---|---|---|---|
| 50 | +10 | 60 | 60 |
| 95 | +10 | 105 | 100 |
| 100 | +1 | 101 | 100 |
| 4 | −5 | −1 | 0 |
| 0 | −1 | −1 | 0 |
| 70 | −25 | 45 | 45 |
About the Bounded Touch Counter
A Bounded Touch Counter is a counter with fixed lower and upper limits that the total cannot cross. The limits stop impossible values such as negative seats or more people than a room holds.
Programmers call this clamping. Bounded counting suits any count with a physical limit, such as bus seats, parking bays, test tubes in a rack or tickets in a book.
Ways to Use the Bounded Touch Counter
The Bounded Touch Counter has 5 key uses, including seat counts and rack slots.
- Seat counts: Bus drivers keep the count between 0 and the 52 seats on board.
- Rack slots: Lab staff count tubes between 0 and the 96 slots in a rack.
- Parking bays: Attendants keep the count between 0 and the number of bays.
- Game health points: Players keep life totals between 0 and 20.
- Class sizes: Teachers cap sign-ups at 30 students.
Tool Details
- Category
- Tally & Calculation
- Controls
- Taps and keys
- Input Support
- Touch, Pen, Mouse, Keys
- Offline Ready
- On your device