fits(x, y, radius) {
        if (x < 0 || y < 0 || x > this.width || y > this.height)
            return false;

        for (let disk = this.disks.length; disk-- > 0;) {
            const dx = x - this.disks[disk].x;
            const dy = y - this.disks[disk].y;
            const dist = radius + this.disks[disk].radius;

            if (dx * dx + dy * dy < dist * dist)
                return false;
        }

        return true;
    }
/**
     * Check if a disk fits at a given position
     * @param {number} x The X position
     * @param {number} y The Y position
     * @param {number} radius The radius
     * @returns {boolean} True if this position fits in the graph
     */
Check if a disk fits at a given position
@param {number} x The X position
@param {number} y The Y position
@param {number} radius The radius
@returns {boolean} True if this position fits in the graph
Check if a disk fits at a given position @param { number } x The X position @param { number } y The Y position @param { number } radius The radius @returns { boolean } True if this position fits in the graph
fits(x, y, radius) {
        if (x < 0 || y < 0 || x > this.width || y > this.height)
            return false;
        for (let disk = this.disks.length; disk-- > 0;) {
            const dx = x - this.disks[disk].x;
            const dy = y - this.disks[disk].y;
            const dist = radius + this.disks[disk].radius;
            if (dx * dx + dy * dy < dist * dist)
                return false;
        }
        return true;
    }
fits ( x , y , radius ) { if ( x < 0 || y < 0 || x > this . width || y > this . height ) return false ; for ( let disk = this . disks . length ; disk -- > 0 ; ) { const dx = x - this . disks [ disk ] . x ; const dy = y - this . disks [ disk ] . y ; const dist = radius + this . disks [ disk ] . radius ; if ( dx * dx + dy * dy < dist * dist ) return false ; } return true ; }
Check if a disk fits at a given position
 @param {number} x The X position
 @param {number} y The Y position
 @param {number} radius The radius
 @returns {boolean} True if this position fits in the graph
Check if a disk fits at a given position @param { number } x The X position @param { number } y The Y position @param { number } radius The radius @returns { boolean } True if this position fits in the graph