Post
Topic
Board Meta
Re: Forum ranks/positions/badges (What do those shiny coins under my name mean?)
by
theSC4RE
on 07/09/2017, 01:36:54 UTC
sorry i have a question what's the meaning of int and max? got confuse with the computation.

waittime = 360;
if(activity >= 15)
        waittime = (int)(90 - activity);
if(activity >= 60)
        waittime=(int)(34.7586 - (0.0793103 * activity));
if(activity >= 100)
        waittime = max((int)(14-(activity/50)), 4);

(int) means the computation will be converted to an int rather than a float (Ex. 4 instead of 4.1052)   
max(value,value) means it'll take the max value between these two numbers