11 t += ((int)(-t) / 24000) * 24000.0f;
13 t -= ((int)(t) / 24000) * 24000.0f;
17 const float values[9][2] = {
18 {4250.0f + 125.0f, 175.0f},
19 {4500.0f + 125.0f, 175.0f},
20 {4750.0f + 125.0f, 250.0f},
21 {5000.0f + 125.0f, 350.0f},
22 {5250.0f + 125.0f, 500.0f},
23 {5500.0f + 125.0f, 675.0f},
24 {5750.0f + 125.0f, 875.0f},
25 {6000.0f + 125.0f, 1000.0f},
26 {6250.0f + 125.0f, 1000.0f},
30 float lastt = values[0][0];
31 for (u32 i = 1; i < 9; i++) {
32 float t0 = values[i][0];
33 float switch_t = (t0 + lastt) / 2.0f;
45 else if (t >= 6125.0f)
48 for (u32 i = 0; i < 9; i++) {
49 if (values[i][0] <= t)
52 float td0 = values[i][0] - values[i - 1][0];
53 float f = (t - values[i - 1][0]) / td0;
54 return f * values[i][1] + (1.0f - f) * values[i - 1][1];