Function updateJump() fix

nextT should cast double as it's a second degree equation and results in a double type. -> Bhaskara.
master
Okke 6 年前 提交者 GitHub
父节点 07b4b785fc
当前提交 a93333ddbf
找不到此签名对应的密钥
GPG 密钥 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)

正在加载...
取消
保存