ixfx
    Preparing search index...

    Function interpolatorBoolean

    • Returns an interpolator function between two boolean values.

      Defaults to 0.5 as the threshold:

      const i = interpolatorBoolean(false, true);
      i(0); // false
      i(0.5); // true
      i(0.6); // true

      You can also specify a different threshold:

      const i = interpolatorBoolean(false, true, { threshold: 0.8 });
      i(0.7); // false
      i(0.8); // true
      i(0.9); // true

      Parameters

      Returns (amount: number) => boolean

      Interpolator function