summaryrefslogtreecommitdiffstats
path: root/libdimension/geometry.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-03-29 15:06:31 -0400
committerTavian Barnes <tavianator@gmail.com>2011-03-29 15:06:31 -0400
commitc44fbdb2512a63a1e145b400dc20130199601b3e (patch)
tree307635071c730289519b1bd96db5f7c4c2a1f4fe /libdimension/geometry.c
parent59db781d7a08e3007d08b6632583ac9ced82e0df (diff)
downloaddimension-c44fbdb2512a63a1e145b400dc20130199601b3e.tar.xz
Some minor optimizations.
Diffstat (limited to 'libdimension/geometry.c')
-rw-r--r--libdimension/geometry.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/geometry.c b/libdimension/geometry.c
index 7e2fd77..827e78a 100644
--- a/libdimension/geometry.c
+++ b/libdimension/geometry.c
@@ -23,7 +23,7 @@
* Geometrical function implementations.
*/
-#include "dimension.h"
+#include "dimension-impl.h"
#include <math.h>
/* Identity matrix */
@@ -152,7 +152,7 @@ dmnsn_matrix_inverse(dmnsn_matrix A)
dmnsn_matrix2 P, Q, R, S, Pi, RPi, PiQ, RPiQ, PP, QQ, RR, SS;
double Pdet = A.n[0][0]*A.n[1][1] - A.n[0][1]*A.n[1][0];
- if (fabs(Pdet) < dmnsn_epsilon) {
+ if (dmnsn_unlikely(fabs(Pdet) < dmnsn_epsilon)) {
/* If P is close to singular, try a more generic algorithm; this is very
* unlikely, but not impossible, eg.
* [ 1 1 0 0 ]