Ensures that a number is between an upper bound and a lower bound.
By default, this function's bounds are **inclusive**, inclusivity/exclusivity can be changed
on a per-bound basis by passing in a string template argument similar to std.random.uniform.
The string template parameter expects a 2-character long string consisting of an
opening parenthesis or opening square bracket, followed by a closing parenthesis or closing square bracket.
The opening bracket is for the lower bound, while the closing bracket is for the upper bound.
Parenteses indicate that the boundary is inclusive, and square brackets indicate the boundary is exclusive.
All possible combinations:
- **()** - Both lower bound and upper bound are inclusive.
- **(]** - Lower bound is inclusive and upper bound is exclusive.
- **[)** - Lower bound is exclusive and upper bound is inclusive.
- **[]** - Both lower bound and upper bound are exclusive.
Ensures that a number is between an upper bound and a lower bound.
By default, this function's bounds are **inclusive**, inclusivity/exclusivity can be changed on a per-bound basis by passing in a string template argument similar to std.random.uniform.
The string template parameter expects a 2-character long string consisting of an opening parenthesis or opening square bracket, followed by a closing parenthesis or closing square bracket. The opening bracket is for the lower bound, while the closing bracket is for the upper bound. Parenteses indicate that the boundary is inclusive, and square brackets indicate the boundary is exclusive.
All possible combinations:
- **()** - Both lower bound and upper bound are inclusive. - **(]** - Lower bound is inclusive and upper bound is exclusive. - **[)** - Lower bound is exclusive and upper bound is inclusive. - **[]** - Both lower bound and upper bound are exclusive.