diff --git a/src/vector.rs b/src/vector.rs index 9cc18a6..05d1ae7 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -360,6 +360,13 @@ macro_rules! impl_vector_default { $VectorN::new($($field),+) } + impl $VectorN { + /// True if all entries in the vector are finite + pub fn is_finite(&self) -> bool { + $(self.$field.is_finite())&&+ + } + } + impl $VectorN { /// Component-wise casting to another type. #[inline]