Java shortening Help

Ten_Tacles

Level 42
Jul 5, 2010
991
0
0
27
Credits
5,910
for(int i=0; i < Level; i++) {



Blockamount = Blockamount + ((((Level*2)-(i*2+1))*((Level*2)-(i*2+1)))*(i+1));

}



Basically, I want to shorten this function into a formula.

I just don't know how.

It is also very complicated >.<
 

Ten_Tacles

Level 42
Jul 5, 2010
991
0
0
27
Credits
5,910
Eh.

I have for each possible Spire four values.

Level, Height, Base size and Block amount.

I can calculate all missing values from Level Height (nearest Level) and Basesize, but Block amount is missing.
 

Users who are viewing this thread