Does a binary search through an array and finds the first element with a value greater than a random target at index 0.
This is a part of a script that chooses a random set of items to put in a supply box where each item set can have a weight assigned to it based on how valuable the items are (higher weight means more common)
Does a binary search through an array and finds the first element with a value greater than a random target at index 0.
This is a part of a script that chooses a random set of items to put in a supply box where each item set can have a weight assigned to it based on how valuable the items are (higher weight means more common)
what language is that?
SQF :D