double thr double currentX startX currentY startY double result int ma

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
double thr() {
double currentX = startX, currentY = startY;
double result = 0;
int i = 0, max = global_steps_counter;
while (i < max) {
result += pow(M_E, currentX) * sin(currentY);
currentX += x_step;
if (currentX > x_end) {
currentX = x_begin;
currentY += y_step;
if (currentY > y_step) {
// err?
}
}
i++;
}