Checks if this value is within the range: [from, to].
from
to
bool within(num from, num to) => (from <= to && this >= from && this <= to) || (from > to && this >= to && this <= from);