Adjusts a string to a number, allowing relative adjustments.

  • Parameters

    • initialValue: number

      The initial number to use for relative operations.

    • cmdStr: string

      The exact string inputted by the user.

    • OptionalmaxValue: number = null

      The maximum allowed value for this variable.

    • OptionalclearValue: number = null

      What to change the variable to if the user simply erased the value.

    Returns number

    The resulting new value.