You are here

function units_operator_add_isolate_operand in Units of Measurement 7.2

1 string reference to 'units_operator_add_isolate_operand'
add.inc in plugins/operator/add.inc

File

plugins/operator/add.inc, line 44

Code

function units_operator_add_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('subtract'), $equal_operand, $operand_to_keep);
}