NAME

Box::Calc::Role::Dimensional - Role to add standard dimensions to objects.

VERSION

version 1.0204

SYNOPSIS

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

METHODS

This role installs these methods:

x

Returns the largest side of an object.

y

Returns the middle side of an object.

z

Returns the shortest side of an object.

weight

Returns the weight of an object.

volume

Returns the result of multiplying x, y, and z.

dimensions

Returns an array reference containing x, y, and z.

extent

Returns a string of x,y,z. Good for comparing whether two items are dimensionally similar.