User Tools

Site Tools


maxrects-lua

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
maxrects-lua [2021/02/13 10:07]
muragami [:insertRect(rect)]
maxrects-lua [2021/02/13 10:21]
muragami [:insertCollection(collect,sort)]
Line 145: Line 145:
   * **return**: Boolean, Number. True if all were inserted, False if only some fit. The number is the amount added.   * **return**: Boolean, Number. True if all were inserted, False if only some fit. The number is the amount added.
  
-Inserts rectangles into the collection, from an array table. If you define sort to one of: 'SortArea', 'SortShortSide', or 'SortLongSide' it will sort them from biggest to smallest using that method before inserting. If you pass anything else as sort, it'll throw an error.+Inserts rectangles into the collection, from an array table. If you define sort to one of: 'SortArea', 'SortShortSide', or 'SortLongSide' it will sort them from biggest to smallest using that method before inserting. If you pass anything else as sort, it'll throw an error. Note: **table.sort() is applied to collect, so it's order might/will be changed by this function.**
 ==== :occupancy() ==== ==== :occupancy() ====
  
maxrects-lua.txt ยท Last modified: 2021/02/13 10:21 by muragami