| summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/core/index.c')
| -rw-r--r-- | src/core/index.c | 16 |
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; + } +} |


