You are here

public function UnitsEntity::dimension in Units of Measurement 7.2

Determine physical dimension of this mathematical expression.

Return value

array Dimension array of this mathematical expression

Overrides UnitsMathematicalExpression::dimension

1 call to UnitsEntity::dimension()
UnitsEntity::containsDimensionlessMember in includes/UnitsEntity.class.inc
Test whether this mathematical expression includes a dimensionless member.

File

includes/UnitsEntity.class.inc, line 26
Definition of UnitsEntity class.

Class

UnitsEntity
Units of measurement entity class.

Code

public function dimension() {
  return is_object($this->decomposition) ? $this
    ->decompose()
    ->dimension() : array(
    $this
      ->identifier() => 1,
  );
}