Skip to content

Commit

Permalink
Don't use is_null in are_collinear
Browse files Browse the repository at this point in the history
  • Loading branch information
CAD97 authored Jan 13, 2024
1 parent c229547 commit 77fa102
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nalgebra-glm/src/gtx/vector_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::traits::Number;
///
/// * [`are_collinear2d()`]
pub fn are_collinear<T: Number>(v0: &TVec3<T>, v1: &TVec3<T>, 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).
Expand Down

0 comments on commit 77fa102

Please sign in to comment.