The best I can describe it is as such:
Answer = (1 + N) * 0.5f * N;
so if N is 5, its the equivalent of answer = 5+4+3+2+1
Is there a c++ function for it? Like in the math library or something.
Aucun commentaire:
Enregistrer un commentaire