|
@@ 159-166 (lines=8) @@
|
| 156 |
|
return $this->getRoot()->convert($other, $this->convert($this->getRoot(), $quantity)); |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
public function multiplyByFactor($quantity) |
| 160 |
|
{ |
| 161 |
|
if (empty($this->factor)) { |
| 162 |
|
throw new NotConvertibleException('method not yet implement: ' . $this->getName()); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
return $this->getCalculator()->multiply($quantity, $this->factor); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function divideByFactor($quantity) |
| 169 |
|
{ |
|
@@ 168-175 (lines=8) @@
|
| 165 |
|
return $this->getCalculator()->multiply($quantity, $this->factor); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function divideByFactor($quantity) |
| 169 |
|
{ |
| 170 |
|
if (empty($this->factor)) { |
| 171 |
|
throw new NotConvertibleException('method not yet implement: ' . $this->getName()); |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
return $this->getCalculator()->divide($quantity, $this->factor); |
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
public function getNode(UnitInterface $unit) |
| 178 |
|
{ |