// import {CompassVector} from '../../../math/geometry/compassVector'
// import {Assert} from '../../../utils/assert'
///  represents a segment of a path
export class LinkedPoint {
    constructor(point) {
        this.Point = point;
    }
    *GetEnumerator() {
        let p;
        for (p = this; p != null; p = p.Next) {
            yield p.Point;
        }
    }
    get X() {
        return this.Point.x;
    }
    get Y() {
        return this.Point.y;
    }
    InsertVerts(i, j, points) {
        for (j--; i < j; j--) {
            this.SetNewNext(points[j]);
        }
    }
    InsertVertsInReverse(i, j, points) {
        for (i++; i < j; i++) {
            this.SetNewNext(points[i]);
        }
    }
    SetNewNext(p) {
        const nv = new LinkedPoint(p);
        const tmp = this.Next;
        this.Next = nv;
        nv.Next = tmp;
        /*Assert.assert(CompassVector.IsPureDirectionPP(this.Point, this.Next.Point))*/
    }
}
//# sourceMappingURL=LinkedPoint.js.map