isUnitInterval static method

bool isUnitInterval(
  1. num num
)

Returns true if the given num is between 0 and 1 (inclusive).

Implementation

static bool isUnitInterval(num num) => num >= 0 && num <= 1;