summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
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 */