Skip to content

Instantly share code, notes, and snippets.

@tyasird
tyasird / RectanglePacking.php
Created January 17, 2018 14:29 — forked from drslump/RectanglePacking.php
rectangle packing in PHP for Metin Gür
<?php
class RectanglePacking {
private $root = array();
private $usedHeight = 0;
private $usedWidth = 0;
function __construct($width, $height) {