Skip to content

Commit

Permalink
Merge pull request #382 from sigureling/dev
Browse files Browse the repository at this point in the history
fix: 🐛 fix overflow bug in logic.HaveView()
  • Loading branch information
panxuc authored May 17, 2024
2 parents acc8593 + 133c262 commit 29e2395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CAPI/cpp/API/include/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace AssistFunction
{
int32_t deltaX = newX - x;
int32_t deltaY = newY - y;
double distance = deltaX * deltaX + deltaY * deltaY;
double distance = double(deltaX * deltaX) + double(deltaY * deltaY);
THUAI7::PlaceType myPlace = map[GridToCell(x)][GridToCell(y)];
THUAI7::PlaceType newPlace = map[GridToCell(newX)][GridToCell(newY)];
if (newPlace == THUAI7::PlaceType::Shadow && myPlace != THUAI7::PlaceType::Shadow)
Expand Down

0 comments on commit 29e2395

Please sign in to comment.