@umbraco-cms/backoffice

    Function calculateExtrapolatedValue

    • Calculates the extrapolated final value based on an initial value and an increase factor.

      Parameters

      • initialValue: number

        The starting value.

      • increaseFactor: number

        The factor by which the value should increase (must be in the range [0(inclusive), 1(exclusive)] where 0 means no increase and 1 means no limit).

      Returns number

      The extrapolated final value. Returns NaN if the increase factor is not within the valid range.

      // Valid input
      const result = calculateExtrapolatedValue(100, 0.2);
      // result is 125

      // Valid input
      const result2 = calculateExtrapolatedValue(50, 0.5);
      // result2 is 100

      // Invalid input (increaseFactor is out of range)
      const result3 = calculateExtrapolatedValue(200, 1.2);
      // result3 is NaN
    MMNEPVFCICPMFPCPTTAAATR