I would like to be able to return (and in our case, for the example, display) an item of an enumeration, according to a certain predefined percentage of chance for each item. An illustration in code of this enumeration just below : Also, these items will be stored in a List. Namely that, as in this example, two items can
Tag: percentage
Get the percentage of a value between two values
I have a minimum value and a maximum value (The values can change). I also have a value that is in between of these two values. Now I need to get the percentage of the currentValue between 0% and 100%. Is this even possible? Thank you for your help! Answer I think what you want to have is this calculation: