diff options
author | SADIK KUZU <sadikkuzu@hotmail.com> | 2023-09-25 14:33:22 +0300 |
---|---|---|
committer | SADIK KUZU <sadikkuzu@hotmail.com> | 2023-09-25 14:33:22 +0300 |
commit | a8ff5f086d832df8851cf253a6b764efc1fd72ba (patch) | |
tree | 7ecfc6e8a7302be3601572f24f56188261f596a8 /core | |
parent | df0a822323a79e1a645f0c6a17d51c7602f23166 (diff) | |
download | redot-engine-a8ff5f086d832df8851cf253a6b764efc1fd72ba.tar.gz |
Fix typo in `heuristic_euclidian` helper in AStarGrid2D
Diffstat (limited to 'core')
-rw-r--r-- | core/math/a_star_grid_2d.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/a_star_grid_2d.cpp b/core/math/a_star_grid_2d.cpp index 9a3744fef8..379d34aa2a 100644 --- a/core/math/a_star_grid_2d.cpp +++ b/core/math/a_star_grid_2d.cpp @@ -32,7 +32,7 @@ #include "core/variant/typed_array.h" -static real_t heuristic_euclidian(const Vector2i &p_from, const Vector2i &p_to) { +static real_t heuristic_euclidean(const Vector2i &p_from, const Vector2i &p_to) { real_t dx = (real_t)ABS(p_to.x - p_from.x); real_t dy = (real_t)ABS(p_to.y - p_from.y); return (real_t)Math::sqrt(dx * dx + dy * dy); @@ -57,7 +57,7 @@ static real_t heuristic_chebyshev(const Vector2i &p_from, const Vector2i &p_to) return MAX(dx, dy); } -static real_t (*heuristics[AStarGrid2D::HEURISTIC_MAX])(const Vector2i &, const Vector2i &) = { heuristic_euclidian, heuristic_manhattan, heuristic_octile, heuristic_chebyshev }; +static real_t (*heuristics[AStarGrid2D::HEURISTIC_MAX])(const Vector2i &, const Vector2i &) = { heuristic_euclidean, heuristic_manhattan, heuristic_octile, heuristic_chebyshev }; void AStarGrid2D::set_region(const Rect2i &p_region) { ERR_FAIL_COND(p_region.size.x < 0 || p_region.size.y < 0); |