Bumpie
|
I tried to find a function for this , but didn't manage to :\
Don't think u can write this in the form f(x)
Therefor I used the tn to show that it's sequence
Y = Amount of Lagg
X = Players
[For retards: Lagg is not direct proportional with amount of players]
Am I right?
Bumpie
And what does this supposed to mean?
Just cuz I get a fucking D in maths doesn't meen you can make fun of me
The method calls itself, so the method is recursive. If you do it with a too high number, you could get a StackOverflowError (because it recurses too much).
It's like calculating factorials (like 4!):Code:public int calculateResult(int x){ if(x <= 1) return 0; else return calculateResult(x - 1) + x - 1; }
You could make it in 1 method as well, using a for-loop or a while-loop.Code:public int factorial(int x){ if(x <= 1) return 1; else return factorial(x - 1) * x; }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |