Function updateJump() fix

nextT should cast double as it's a second degree equation and results in a double type. -> Bhaskara.
master
Okke pirms 6 gadiem revīziju iesūtīja GitHub
vecāks 07b4b785fc
revīzija a93333ddbf
Šim parakstam datu bāzē netika atrasta zināma atslēga
GPG atslēgas ID: 4AEE18F83AFDEB23

@ -405,7 +405,7 @@ void Creature::updateJump()
int nextT, i = 1;
do {
nextT = stdext::round((-b + std::sqrt(std::max<int>(b*b + 4*a*(roundHeight+diff*i), 0.0)) * diff) / (2*a));
nextT = stdext::round((-b + std::sqrt(std::max<double>(b*b + 4*a*(roundHeight+diff*i), 0.0)) * diff) / (2*a));
++i;
if(nextT < halfJumpDuration)

Notiek ielāde…
Atcelt
Saglabāt