is_zero default dev

Thu, 01 May 2025 00:08:09 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Thu, 01 May 2025 00:08:09 -0500
branch
dev
changeset 113
d97fcf22a61c
parent 112
ed8124f1af1d
child 114
b53806de0be0

is_zero default

src/norms.rs file | annotate | diff | comparison | revisions
--- a/src/norms.rs	Thu May 01 00:01:15 2025 -0500
+++ b/src/norms.rs	Thu May 01 00:08:09 2025 -0500
@@ -226,7 +226,9 @@
 
     // fn similar_origin(&self) -> Self;
 
-    fn is_zero(&self) -> bool;
+    fn is_zero(&self) -> bool {
+        self.norm_() == F::ZERO
+    }
 }
 
 pub trait HasDual<F: Num = f64>: Normed<F> {

mercurial