Function xyFindClosestPoint

  • Finds the closest point

    Parameters

    • data: DataXY<NumberArray>

      x array should be sorted and ascending

    • target: number

      target to search

    Returns PointXY

    • closest point