Arrangement

constructor(priority: Int, targetSmallSize: Float, minSmallSize: Float, maxSmallSize: Float, smallCount: Int, targetMediumSize: Float, mediumCount: Int, targetLargeSize: Float, largeCount: Int, availableSpace: Float)

Creates a new arrangement by taking in a number of small, medium, and large items and the size each would like to be and then fitting the sizes to work within the availableSpace.

Note: The values for each item size after construction will likely differ from the target values passed to the constructor since the constructor handles altering the sizes until the total count is able to fit within the space see fit for more details.

Parameters

priority

the order in which this arrangement should be preferred against other arrangements that fit

targetSmallSize

the size of a small item in this arrangement

minSmallSize

the minimum size a small item is allowed to be

maxSmallSize

the maximum size a small item is allowed to be

smallCount

the number of small items in this arrangement

targetMediumSize

the size of medium items in this arrangement

mediumCount

the number of medium items in this arrangement

targetLargeSize

the size of large items in this arrangement

largeCount

the number of large items in this arrangement

availableSpace

the space this arrangement needs to fit within