summaryrefslogtreecommitdiff
path: root/code/core/min.h
diff options
context:
space:
mode:
Diffstat (limited to 'code/core/min.h')
-rw-r--r--code/core/min.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/code/core/min.h b/code/core/min.h
new file mode 100644
index 0000000..78472ab
--- /dev/null
+++ b/code/core/min.h
@@ -0,0 +1,13 @@
+#ifndef MIN_H
+#define MIN_H
+
+template<class L, class R>
+inline L min(L l, R r) {
+ if (l < r) {
+ return l;
+ }else{
+ return r;
+ }
+}
+
+#endif // MIN_H
contact: Jan Huwald // Impressum