You are here

function units_operator_multiply_isolate_operand in Units of Measurement 7.2

1 string reference to 'units_operator_multiply_isolate_operand'
multiply.inc in plugins/operator/multiply.inc

File

plugins/operator/multiply.inc, line 36

Code

function units_operator_multiply_isolate_operand(UnitsMathematicalExpression $operand1, UnitsMathematicalExpression $operand2, UnitsMathematicalExpression $equal_operand, $operand_to_isolate) {
  if ($operand_to_isolate == 1) {
    $operand_to_keep = $operand2;
  }
  else {
    $operand_to_keep = $operand1;
  }
  return units_mathematical_expression_operator_construct(units_get_operator('divide'), $equal_operand, $operand_to_keep);
}