@@ -85,6 +85,9 @@ |
||
85 | 85 | return $this->PDFByValue($value); |
86 | 86 | } |
87 | 87 | |
88 | + /** |
|
89 | + * @param NumberInterface $value |
|
90 | + */ |
|
88 | 91 | public function PDFByValue($value) |
89 | 92 | { |
90 | 93 | $value = Numbers::makeOrDont($this->numberType, $value); |
@@ -88,6 +88,9 @@ |
||
88 | 88 | |
89 | 89 | } |
90 | 90 | |
91 | + /** |
|
92 | + * @param NumberInterface $p |
|
93 | + */ |
|
91 | 94 | public static function inverseNormalCDF($p, $precision = 10) |
92 | 95 | { |
93 | 96 | $pi = Numbers::makePi(); |
@@ -221,8 +221,8 @@ |
||
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
224 | - * @param $a |
|
225 | - * @param $b |
|
224 | + * @param ImmutableNumber $a |
|
225 | + * @param NumberInterface $b |
|
226 | 226 | * |
227 | 227 | * @return NumberInterface |
228 | 228 | */ |
@@ -22,6 +22,9 @@ discard block |
||
22 | 22 | |
23 | 23 | protected $base; |
24 | 24 | |
25 | + /** |
|
26 | + * @param integer $precision |
|
27 | + */ |
|
25 | 28 | public function __construct($value, $precision = null, $base = 10) |
26 | 29 | { |
27 | 30 | $this->base = $base; |
@@ -49,6 +52,9 @@ discard block |
||
49 | 52 | return $this->precision; |
50 | 53 | } |
51 | 54 | |
55 | + /** |
|
56 | + * @param NumberInterface $num |
|
57 | + */ |
|
52 | 58 | public function add($num) |
53 | 59 | { |
54 | 60 | $num = Numbers::makeOrDont($this, $num, $this->getPrecision()); |
@@ -98,7 +104,7 @@ discard block |
||
98 | 104 | * Note about precision: it uses the smaller of the two precisions (significant figures). |
99 | 105 | * |
100 | 106 | * @param $num |
101 | - * @return mixed |
|
107 | + * @return NumberInterface |
|
102 | 108 | */ |
103 | 109 | public function divide($num) |
104 | 110 | { |
@@ -509,6 +515,9 @@ discard block |
||
509 | 515 | } |
510 | 516 | } |
511 | 517 | |
518 | + /** |
|
519 | + * @param integer $value |
|
520 | + */ |
|
512 | 521 | public function isGreaterThan($value): bool |
513 | 522 | { |
514 | 523 | $value = Numbers::makeOrDont(Numbers::IMMUTABLE, $value, $this->getPrecision()); |
@@ -541,6 +550,9 @@ discard block |
||
541 | 550 | } |
542 | 551 | } |
543 | 552 | |
553 | + /** |
|
554 | + * @param integer $value |
|
555 | + */ |
|
544 | 556 | public function isLessThanOrEqualTo($value): bool |
545 | 557 | { |
546 | 558 | $value = Numbers::makeOrDont(Numbers::IMMUTABLE, $value, $this->getPrecision()); |