Pathfinder 1e for Foundry VTT
    Preparing search index...

    Function convertDistance

    • Converts feet to what the world is using as a measurement unit.

      Parameters

      • value: number

        The value (in feet) to convert.

      • type: "mi" | "ft" | "in" = "ft"

        The original type to convert from. Either 'ft' (feet, default), 'mi' (miles, in which case the result is in km (metric)), or 'in' (inches, in which case the result is in cm (metric))

      Returns [range: number, unit: string]

      An array containing the converted value in index 0 and the new unit key in index 1 (for use in pf1.config.measureUnits, for example)

      With metric enabled

      pf1.utils.convertDistance(30); // => [9, "m"]