Skip to content

Commit db015aa

Browse files
authored
Update lib.rs
1 parent 214aab7 commit db015aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ pub extern "C" fn rotate_given_surface_normal(nx: f64, ny: f64, nz: f64, ux: &mu
15181518
let c = into_surface.dot(&RUSTBCA_DIRECTION);
15191519
let vx = Matrix3::<f64>::new(0.0, -v.z, v.y, v.z, 0.0, -v.x, -v.y, v.x, 0.0);
15201520

1521-
let rotation_matrix = if (c + 1.0).abs() > 1e-6 {
1521+
let rotation_matrix = if (c + 1.0).abs() > DELTA {
15221522
Matrix3::identity() + vx + vx*vx/(1. + c)
15231523
} else {
15241524
//If c == -1.0, the correct rotation should simply be a 180 degree rotation

0 commit comments

Comments
 (0)