| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-02-03 22:20:35 +0100 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-02-03 22:20:35 +0100 |
| commit | ee26b8ff850add4f83b912635a71dbde06f268d1 (patch) | |
| tree | ada230a0d34aaf2a0e9fbecadde0bdf0dcdf1da4 /src/core/index.c | |
| parent | 1dafef5fdf9d98b38cbe717b8a220d721f0ebea8 (diff) | |
Continuing Implementation...
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; + } +} |


