You are here

public function UnitsEntity::decompose in Units of Measurement 7.2

Decompose (simplify) this mathematical expression.

Return value

UnitsMathematicalExpression Decomposed (simplified) version of this mathematical expression

Overrides UnitsMathematicalExpression::decompose

1 call to UnitsEntity::decompose()
UnitsEntity::inverseDecompose in includes/UnitsEntity.class.inc
Create inverse decomposition mathematical expression.

File

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

Class

UnitsEntity
Units of measurement entity class.

Code

public function decompose() {
  if (is_object($this->decomposition)) {
    return $this->decomposition
      ->getExpression()
      ->decompose();
  }
  return $this;
}