Box::Calc::Role::Dimensional - Role to add standard dimensions to objects.
The x, y, and z attributes are first sorted from largest to smallest before creating the object. So you can insert them in any order. x=3, y=9, z=1 would become x=r9, y=3, z=1.
#----------# | | | | | Y | | | | | | X | #----------# Z is from bottom up
This role installs these methods:
Returns the largest side of an object.
Returns the middle side of an object.
Returns the shortest side of an object.
Returns the weight of an object.
Returns the result of multiplying x, y, and z.
Returns an array reference containing x, y, and z.
Returns a string of
x,y,z. Good for comparing whether two items are dimensionally similar.