I'm looking for a formula that can limit a specific input within a specific range.
I want to limit a number within 0 and 100. Example:
- Input: -100 / Output: 0
- Input: -1 / Output: 0
- Input: 0 / Output: 0
- Input: 10 / Output: 10
- Input: 50 / Output: 50
- Input: 100 / Output: 100
- Input: 101 / Output: 100
- Input: 150 / Output: 100
I really only know the basics of math. I'm not even sure what to search to see if this question was already asked.
Is this possible? I'm a developer/programmer so I could use conditions but I'm wondering if there's a formula I could use instead.