Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

Commit fd9498a

Browse files
committed
question
1 parent 71436e8 commit fd9498a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/squaternion.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ struct Quaternion {
3333
data_t m = sqrt(w * w + x * x + y * y + z * z);
3434

3535
if (m < 1.0e-6) {
36-
// throw QuaternionError();
3736
return 1;
3837
}
3938

39+
// use isinf(inv_m) instead?
40+
// the above test will capture really large inv_m
41+
// in addition to infinate
4042
data_t inv_m = 1.0 / m;
4143

4244
this->w *= inv_m;

0 commit comments

Comments
 (0)