PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.10.8
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.10.8
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 3.10.4 All 148 releases
← All changes | vendor/markbaker/complex/classes/src/Complex.php +6 -3 3.1.33.10.8 View file →
@@ -175,10 +175,13 @@
175 175 // We've been given a string to parse to extract the real and imaginary parts, and any suffix
176 176 list($realPart, $imaginaryPart, $suffix) = self::parseComplex($realPart);
177 177 }
178 178 }
179 - if ($imaginaryPart <> 0.0 && empty($suffix)) {
179 +
180 + if ($imaginaryPart != 0.0 && empty($suffix)) {
180 181 $suffix = 'i';
182 + } elseif ($imaginaryPart == 0.0 && !empty($suffix)) {
183 + $suffix = '';
181 184 }
182 185
183 186 // Set parsed values in our properties
184 187 $this->realPart = (float) $realPart;
@@ -372,14 +375,14 @@
372 375 {
373 376 $functionName = strtolower(str_replace('_', '', $functionName));
374 377
375 378 // Test for function calls
376 - if (in_array($functionName, self::$functions)) {
379 + if (in_array($functionName, self::$functions, true)) {
377 380 $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}";
378 381 return $functionName($this, ...$arguments);
379 382 }
380 383 // Test for operation calls
381 - if (in_array($functionName, self::$operations)) {
384 + if (in_array($functionName, self::$operations, true)) {
382 385 $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}";
383 386 return $functionName($this, ...$arguments);
384 387 }
385 388 throw new Exception('Function or Operation does not exist');