From 77fa10222c051a86fcec53061f7e29a0bae8f7d3 Mon Sep 17 00:00:00 2001 From: Christopher Durham Date: Fri, 12 Jan 2024 23:56:50 -0500 Subject: [PATCH] Don't use `is_null` in `are_collinear` --- nalgebra-glm/src/gtx/vector_query.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nalgebra-glm/src/gtx/vector_query.rs b/nalgebra-glm/src/gtx/vector_query.rs index 587620ac5..2e2a8f719 100644 --- a/nalgebra-glm/src/gtx/vector_query.rs +++ b/nalgebra-glm/src/gtx/vector_query.rs @@ -9,7 +9,7 @@ use crate::traits::Number; /// /// * [`are_collinear2d()`] pub fn are_collinear(v0: &TVec3, v1: &TVec3, epsilon: T) -> bool { - is_null(&v0.cross(v1), epsilon) + abs_diff_eq!(v0.cross(v1), T::zero(), epsilon = epsilon) } /// Returns `true` if two 2D vectors are collinear (up to an epsilon).