From 0f730d213ec983eef20e2e354fd3db1a85e527cb Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Sun, 8 Sep 2019 22:55:41 -0500 Subject: [PATCH] Added is_valid method to BoundingBox. --- include/openmc/surface.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/openmc/surface.h b/include/openmc/surface.h index d61ae07ce..9cdc460bb 100644 --- a/include/openmc/surface.h +++ b/include/openmc/surface.h @@ -83,6 +83,13 @@ struct BoundingBox return *this; } + inline bool is_valid() { + return xmin <= xmax && + ymin <= ymax && + zmin <= zmax; + } + + }; //==============================================================================