summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-06-06 13:07:50 -0600
committerTavian Barnes <tavianator@gmail.com>2010-06-06 13:07:50 -0600
commit347f6268b922012055fbe77bb4ce9962cbdeb18e (patch)
tree438fd9532755bc956ee7860e9a6388043e395802 /libdimension/dimension
parent07806324bb384d3707840303e08f209005afaffe (diff)
downloaddimension-347f6268b922012055fbe77bb4ce9962cbdeb18e.tar.xz
New dmnsn_bounding_box_is_infinite() predicate.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/geometry.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libdimension/dimension/geometry.h b/libdimension/dimension/geometry.h
index effac7c..98fc913 100644
--- a/libdimension/dimension/geometry.h
+++ b/libdimension/dimension/geometry.h
@@ -300,4 +300,11 @@ dmnsn_bounding_box_contains(dmnsn_bounding_box box, dmnsn_vector p)
&& (p.x <= box.max.x && p.y <= box.max.y && p.z <= box.max.z);
}
+/* Return whether `box' is infinite */
+DMNSN_INLINE bool
+dmnsn_bounding_box_is_infinite(dmnsn_bounding_box box)
+{
+ return box.min.x == -INFINITY;
+}
+
#endif /* DIMENSION_GEOMETRY_H */