Chalkboard - v3.0.1
    Preparing search index...

    Function dist

    • Calculates the distance between two n-dimensional points.

      Parameters

      • p1: number[]

        The first point

      • p2: number[]

        The second point

      Returns number

      // Returns 11.224972160321824
      const distance = Chalkboard.geom.dist([1, 2, -6], [3, 1, 5]);