math docs
    Preparing search index...

    Function setFromPoints

    • Sets the circle to enclose a set of points. The center is the center of the points' bounding box and the radius is the distance to the farthest point. This is fast and always encloses every point, but is not the minimal enclosing circle.

      With no points (n <= 0) the circle is set to the origin with radius 0. NaN coordinates are not supported and give an unspecified result.

      Parameters

      • out: circle.Circle

        the circle to store the result

      • points: readonly number[]

        points as a flat array [x0, y0, x1, y1, ...]

      • n: number

        number of points to read from points

      Returns circle.Circle

      out