constructor(coordinates, layout, ends) {
    super();

    /**
     * @type {Array<number>}
     * @private
     */
    this.ends_ = [];

    /**
     * @private
     * @type {number}
     */
    this.flatInteriorPointRevision_ = -1;

    /**
     * @private
     * @type {import("../coordinate.js").Coordinate|null}
     */
    this.flatInteriorPoint_ = null;

    /**
     * @private
     * @type {number}
     */
    this.maxDelta_ = -1;

    /**
     * @private
     * @type {number}
     */
    this.maxDeltaRevision_ = -1;

    /**
     * @private
     * @type {number}
     */
    this.orientedRevision_ = -1;

    /**
     * @private
     * @type {Array<number>|null}
     */
    this.orientedFlatCoordinates_ = null;

    if (layout !== undefined && ends) {
      this.setFlatCoordinates(
        layout,
        /** @type {Array<number>} */ (coordinates),
      );
      this.ends_ = ends;
    } else {
      this.setCoordinates(
        /** @type {Array<Array<import("../coordinate.js").Coordinate>>} */ (
          coordinates
        ),
        layout,
      );
    }
  }
@param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
    Array of linear rings that define the polygon. The first linear ring of the
    array defines the outer-boundary or surface of the polygon. Each subsequent
    linear ring defines a hole in the surface of the polygon. A linear ring is
    an array of vertices' coordinates where the first coordinate and the last are
    equivalent. (For internal use, flat coordinates in combination with
    `layout` and `ends` are also accepted.)
@param {import("./Geometry.js").GeometryLayout} [layout] Layout.
@param {Array<number>} [ends] Ends (for internal use with flat coordinates).