Mrand of zero to any multiple should return 0 (#1773)
This commit is contained in:
parent
d2edab2827
commit
ec51b75fee
|
|
@ -851,7 +851,7 @@ class MathTrig
|
||||||
$multiple = Functions::flattenSingleValue($multiple);
|
$multiple = Functions::flattenSingleValue($multiple);
|
||||||
|
|
||||||
if ((is_numeric($number)) && (is_numeric($multiple))) {
|
if ((is_numeric($number)) && (is_numeric($multiple))) {
|
||||||
if ($multiple == 0) {
|
if ($number == 0 || $multiple == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if ((self::SIGN($number)) == (self::SIGN($multiple))) {
|
if ((self::SIGN($number)) == (self::SIGN($multiple))) {
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,11 @@ return [
|
||||||
31415.92654,
|
31415.92654,
|
||||||
1,
|
1,
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
5,
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'#NUM!',
|
'#NUM!',
|
||||||
5,
|
5,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue