between method

bool between(
  1. int a,
  2. int b
)

Determines if this is between a and b whereas the bounds are inclusive.

Implementation

bool between(int a, int b) {
  return this >= a && this <= b;
}