close()
    {
        const points = this.points;

        // close the poly if the value is true!
        if (points[0] !== points[points.length - 2] || points[1] !== points[points.length - 1])
        {
            points.push(points[0], points[1]);
        }
    }
/**
     * Closes the polygon, adding points if necessary.
     */
Closes the polygon, adding points if necessary.
Closes the polygon adding points if necessary .
close()
    {
        const points = this.points;
        if (points[0] !== points[points.length - 2] || points[1] !== points[points.length - 1])
        {
            points.push(points[0], points[1]);
        }
    }
close ( ) { const points = this . points ; if ( points [ 0 ] !== points [ points . length - 2 ] || points [ 1 ] !== points [ points . length - 1 ] ) { points . push ( points [ 0 ] , points [ 1 ] ) ; } }
Closes the polygon, adding points if necessary.
Closes the polygon adding points if necessary .
// close the poly if the value is true!