From ee26b8ff850add4f83b912635a71dbde06f268d1 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Fri, 3 Feb 2017 22:20:35 +0100 Subject: Continuing Implementation... --- src/core/index.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/core/index.c') 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; + } +} -- cgit v1.2.3-70-g09d2