From f0e4ee658267c8cdfe52e343a50ead660dbe692f Mon Sep 17 00:00:00 2001 From: CismonX Date: Sat, 21 Mar 2020 23:51:13 +0800 Subject: [PATCH] Add stub for `isZero`. --- stubs/internal/Base.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stubs/internal/Base.php b/stubs/internal/Base.php index 1862ea4..ffe6e4a 100644 --- a/stubs/internal/Base.php +++ b/stubs/internal/Base.php @@ -141,6 +141,16 @@ interface Base extends Countable */ function isFinite(); + /** + * Checks whether all elements of the object are zero (value <= tolerance). + * + * For objects with complex numbers, real and imaginary part are checked separately. + * + * @param number $tol[optional] + * @return bool + */ + function isZero($tol); + /** * Checks whether at least one of the elements of the object is ±infinity. *