Measure distance between two points.

pf1.utils.measureDistance(token, game.user.targets.first());
  • Parameters

    • p0: Point

      Start point on canvas

    • p1: Point

      End point on canvas

    • Optionaloptions: { diagonalRule?: "5105" | "555"; ray?: Ray; state?: any } = {}

      Measuring options.

      • OptionaldiagonalRule?: "5105" | "555"

        Used diagonal rule. Defaults to 5/10/5 PF measuring.

      • Optionalray?: Ray

        Pre-generated ray to use instead of the points.

      • Optionalstate?: any

        Optional state tracking across multiple measures.

    Returns number

    • Grid distance between the two points.