@maxgraph/core

    Function ptLineDist

    • Returns the distance between a line defined by two points and a point. To get the distance between a point and a segment (with a specific length) use Utils#ptSeqDistSq.

      Parameters

      • x1: number

        X-coordinate of point 1 of the line.

      • y1: number

        Y-coordinate of point 1 of the line.

      • x2: number

        X-coordinate of point 1 of the line.

      • y2: number

        Y-coordinate of point 1 of the line.

      • px: number

        X-coordinate of the point.

      • py: number

        Y-coordinate of the point.

      Returns number

    MMNEPVFCICPMFPCPTTAAATR