src/main/java/dev/rsoliveira/tools/binpacking/simulation/PalletPackingSimulation.java
/**
     * Finds the item with the smallest z-dimension gap.
     */
Finds the item with the smallest z-dimension gap.
Finds the item with the smallest z - dimension gap .
private ScrapPad findSmallestZ(PalletPackingState state) {
        ScrapPad temp = state.getScrapFirst();
        ScrapPad smallest = temp;
        while (temp.getNext() != null) {
            if (temp.getNext().getGapZ() < smallest.getGapZ()) {
                smallest = temp.getNext();
            }
            temp = temp.getNext();
        }
        return smallest;
    }
private ScrapPad findSmallestZ ( PalletPackingState state ) { ScrapPad temp = state . getScrapFirst ( ) ; ScrapPad smallest = temp ; while ( temp . getNext ( ) != null ) { if ( temp . getNext ( ) . getGapZ ( ) < smallest . getGapZ ( ) ) { smallest = temp . getNext ( ) ; } temp = temp . getNext ( ) ; } return smallest ; }
Finds the item with the smallest z-dimension gap.
Finds the item with the smallest z - dimension gap .