Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
romandykyi committed Jul 6, 2024
1 parent bd7c9cc commit 417a431
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public MazeCell Select(MazeCell cell)
);

double[] neighborsHeatmap = new double[cell.Neighbors.Length];
double heatmapSum = 0f;
double heatmapSum = 0.0;
for (int i = 0; i < neighborsHeatmap.Length; i++)
{
double heatValue = _heatmap[cell.Neighbors[i].Index].Temperature;
Expand All @@ -83,7 +83,7 @@ public MazeCell Select(MazeCell cell)
double rndNumber = (double)(1.0 - _rnd.NextDouble()); // From 0 (exclusive) to 1 (inclusive)

// Cumulative Distribution Function
double cdf = 0f;
double cdf = 0.0;
for (int i = 0; i < neighborsHeatmap.Length; i++)
{
cdf += neighborsHeatmap[i] / heatmapSum;
Expand Down

0 comments on commit 417a431

Please sign in to comment.