summaryrefslogtreecommitdiffstats
path: root/source/cCuboid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/cCuboid.cpp')
-rw-r--r--source/cCuboid.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/cCuboid.cpp b/source/cCuboid.cpp
new file mode 100644
index 000000000..9f102129c
--- /dev/null
+++ b/source/cCuboid.cpp
@@ -0,0 +1,10 @@
+#include "cCuboid.h"
+
+#include <algorithm> // swap
+
+void cCuboid::Sort()
+{
+ if( p1.x > p2.x ) std::swap( p1.x, p2.x );
+ if( p1.y > p2.y ) std::swap( p1.y, p2.y );
+ if( p1.z > p2.z ) std::swap( p1.z, p2.z );
+} \ No newline at end of file