@@ -69,7 +69,7 @@ |
||
69 | 69 | * |
70 | 70 | * @return bool |
71 | 71 | */ |
72 | - public function isEqual(NumberInterface|int|string|float $value): bool; |
|
72 | + public function isEqual(NumberInterface | int | string | float $value): bool; |
|
73 | 73 | |
74 | 74 | /** |
75 | 75 | * @return int|null |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * |
25 | 25 | * @return DecimalInterface |
26 | 26 | */ |
27 | - public function continuousModulo(NumberInterface|string|int|float $mod): DecimalInterface; |
|
27 | + public function continuousModulo(NumberInterface | string | int | float $mod): DecimalInterface; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * @param $num |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @param DecimalInterface $num |
16 | 16 | * @return float|int |
17 | 17 | */ |
18 | - abstract protected static function translateToNative(DecimalInterface $num): float|int; |
|
18 | + abstract protected static function translateToNative(DecimalInterface $num): float | int; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * @return float |
@@ -41,7 +41,7 @@ |
||
41 | 41 | * @return bool |
42 | 42 | * @throws IntegrityConstraint |
43 | 43 | */ |
44 | - public function isEqual(NumberInterface|int|string|float $value): bool |
|
44 | + public function isEqual(NumberInterface | int | string | float $value): bool |
|
45 | 45 | { |
46 | 46 | |
47 | 47 | $check = $this->checkComparisonTraitAndInterface(); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | public function sort(): NumberCollectionInterface |
181 | 181 | { |
182 | - $this->getCollection()->sort(function($left, $right){ |
|
182 | + $this->getCollection()->sort(function($left, $right) { |
|
183 | 183 | return ArithmeticProvider::compare($left->getAsBaseTenRealNumber(), $right->getAsBaseTenRealNumber()); |
184 | 184 | }); |
185 | 185 | |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | */ |
313 | 313 | public function getRandom(): NumberInterface |
314 | 314 | { |
315 | - $maxKey = $this->getCollection()->count() - 1; |
|
315 | + $maxKey = $this->getCollection()->count()-1; |
|
316 | 316 | |
317 | 317 | $key = RandomProvider::randomInt(0, $maxKey, RandomMode::Speed)->asInt(); |
318 | 318 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * @throws IntegrityConstraint |
22 | 22 | * @throws MissingPackage |
23 | 23 | */ |
24 | - public function continuousModulo(NumberInterface|string|int|float $mod): DecimalInterface |
|
24 | + public function continuousModulo(NumberInterface | string | int | float $mod): DecimalInterface |
|
25 | 25 | { |
26 | 26 | |
27 | 27 | $mod = Numbers::makeOrDont(Numbers::IMMUTABLE, $mod, $this->scale+1); |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | public static function radiansToDegrees($radians) |
22 | 22 | { |
23 | 23 | $radians = Numbers::makeOrDont(Numbers::IMMUTABLE, $radians); |
24 | - $pi = Numbers::makePi($radians->getScale() + 2); |
|
24 | + $pi = Numbers::makePi($radians->getScale()+2); |
|
25 | 25 | |
26 | - return $radians->multiply(180)->divide($pi, $radians->getScale() + 2)->round($radians->getScale() - 2)->getValue(NumberBase::Ten); |
|
26 | + return $radians->multiply(180)->divide($pi, $radians->getScale()+2)->round($radians->getScale()-2)->getValue(NumberBase::Ten); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | public static function degreesToRadians($degrees) |
36 | 36 | { |
37 | 37 | $degrees = Numbers::makeOrDont(Numbers::IMMUTABLE, $degrees); |
38 | - $pi = Numbers::makePi($degrees->getScale() + 1); |
|
38 | + $pi = Numbers::makePi($degrees->getScale()+1); |
|
39 | 39 | |
40 | 40 | return $degrees->multiply($pi)->divide(180)->round($degrees->getScale())->getValue(NumberBase::Ten); |
41 | 41 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * @throws IntegrityConstraint |
25 | 25 | * @throws MissingPackage |
26 | 26 | */ |
27 | - public function continuousModulo(NumberInterface|string|int|float $mod): DecimalInterface |
|
27 | + public function continuousModulo(NumberInterface | string | int | float $mod): DecimalInterface |
|
28 | 28 | { |
29 | 29 | |
30 | 30 | $mod = Numbers::makeOrDont(Numbers::IMMUTABLE, $mod); |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | return self::$pi->truncateToScale($digits)->getValue(NumberBase::Ten); |
38 | 38 | } |
39 | 39 | |
40 | - $internalScale = ($digits*2) + 10; |
|
40 | + $internalScale = ($digits*2)+10; |
|
41 | 41 | |
42 | 42 | $C = Numbers::make(Numbers::IMMUTABLE, '10005', $internalScale)->setMode(CalcMode::Precision)->sqrt($internalScale)->multiply(426880); |
43 | 43 | $M = Numbers::make(Numbers::IMMUTABLE, '1', $internalScale)->setMode(CalcMode::Precision); |
44 | 44 | $L = Numbers::make(Numbers::IMMUTABLE, '13591409', $internalScale)->setMode(CalcMode::Precision); |
45 | 45 | $K = Numbers::make(Numbers::IMMUTABLE, '6', $internalScale)->setMode(CalcMode::Precision); |
46 | 46 | $X = Numbers::make(Numbers::IMMUTABLE, '1')->setMode(CalcMode::Precision); |
47 | - $sum = Numbers::make(Numbers::MUTABLE,'0', $internalScale + 2)->setMode(CalcMode::Precision); |
|
47 | + $sum = Numbers::make(Numbers::MUTABLE, '0', $internalScale+2)->setMode(CalcMode::Precision); |
|
48 | 48 | $termNum = 0; |
49 | 49 | $one = Numbers::makeOne($internalScale)->setMode(CalcMode::Precision); |
50 | 50 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | return self::$e->truncateToScale($digits)->getValue(NumberBase::Ten); |
97 | 97 | } |
98 | 98 | |
99 | - $internalScale = $digits + 3; |
|
99 | + $internalScale = $digits+3; |
|
100 | 100 | |
101 | 101 | $one = Numbers::makeOne($internalScale+5)->setMode(CalcMode::Precision); |
102 | 102 | $denominator = Numbers::make(Numbers::MUTABLE, '1', $internalScale)->setMode(CalcMode::Precision); |