• Calculates range formula and converts it.

    Wrapper around calculateRangeFormula and convertDistance

    Parameters

    • formula: string

      Range formula

    • type: string = "ft"

      Type fed to calculateRangeFormula

    • rollData: object = {}

      Roll data fed to calculateRangeFormula

    Returns number[]

    • Range value and unit tuple

    Example

    Simple example

    const [range,unit] = calculateRange("@level", "mi", { level:2 });
    // => range:10560, unit:"ft"

Generated using TypeDoc