mirror of
https://github.com/rt64/rt64.git
synced 2025-04-16 05:42:29 +00:00
Fix division by zero possibility during frame matching.
This commit is contained in:
parent
df5bd0cfd1
commit
b2e98b9d28
@ -644,11 +644,16 @@ namespace RT64 {
|
|||||||
const GameFrameMap::TileMap &prevTileMap = firstPrevWorkloadMap->tiles[indices.second];
|
const GameFrameMap::TileMap &prevTileMap = firstPrevWorkloadMap->tiles[indices.second];
|
||||||
curTileMap = prevTileMap;
|
curTileMap = prevTileMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto modulo = [](int a, int b) {
|
auto modulo = [](int a, int b) {
|
||||||
int r = a % b;
|
if (b != 0) {
|
||||||
return r < 0 ? r + b : r;
|
int r = a % b;
|
||||||
};
|
return r < 0 ? r + b : r;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const float deltaUls = curTile.uls - prevTile.uls;
|
const float deltaUls = curTile.uls - prevTile.uls;
|
||||||
const float deltaUlt = curTile.ult - prevTile.ult;
|
const float deltaUlt = curTile.ult - prevTile.ult;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user