ExBoxPacker.Sorting.BoxSorter behaviour (ExBoxPacker v0.2.0)

Copy Markdown View Source

Behaviour for ordering candidate boxes (analog of BoxPacker's BoxSorter).

Summary

Callbacks

Return a negative int if a sorts before b, positive if after, 0 if equal.

Callbacks

compare(a, b)

@callback compare(a :: ExBoxPacker.Box.t(), b :: ExBoxPacker.Box.t()) :: integer()

Return a negative int if a sorts before b, positive if after, 0 if equal.