inRange method

bool inRange(
  1. num min,
  2. num max
)

Returns true if this number is within the inclusive range between min and max.

Example:

5.inRange(1, 10); // true
0.inRange(1, 10); // false

Implementation

bool inRange(num min, num max) => this >= min && this <= max;