summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-02-03 22:20:35 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-02-03 22:20:35 +0100
commitee26b8ff850add4f83b912635a71dbde06f268d1 (patch)
treeada230a0d34aaf2a0e9fbecadde0bdf0dcdf1da4 /src/core/index.c
parent1dafef5fdf9d98b38cbe717b8a220d721f0ebea8 (diff)
Continuing Implementation...
Diffstat (limited to 'src/core/index.c')
-rw-r--r--src/core/index.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/index.c b/src/core/index.c
index dc52d03..5c93ed3 100644
--- a/src/core/index.c
+++ b/src/core/index.c
@@ -64,3 +64,19 @@ ZoO_index ZoO_index_random_up_to (const ZoO_index max)
* ((float) max)
);
}
+
+int ZoO_index_cmp (const ZoO_index a, const ZoO_index b)
+{
+ if (a < b)
+ {
+ return -1;
+ }
+ else if (a > b)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}