Total Complexity | 1 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | use Samsara\Fermat\Core\Values\ImmutableFraction; |
||
10 | |||
11 | class MutableComplexNumber extends ComplexNumber |
||
12 | { |
||
13 | |||
14 | 82 | protected function setValue( |
|
15 | ImmutableDecimal|ImmutableFraction $realPart, |
||
16 | ImmutableDecimal|ImmutableFraction $imaginaryPart, |
||
17 | ?int $scale = null |
||
18 | ): static|MutableComplexNumber |
||
|
|||
19 | { |
||
20 | 82 | $scale = $scale ?? $this->getScale(); |
|
21 | |||
22 | 82 | $this->scale = $scale; |
|
23 | 82 | $this->realPart = $realPart; |
|
24 | 82 | $this->imaginaryPart = $imaginaryPart; |
|
25 | |||
35 | } |