Skip to content

Commit 78dbf4a

Browse files
committed
Fix erroneous upper bound in one of the clamp calls.
1 parent 28d0a73 commit 78dbf4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kagen/generators/geometric/rgg/rgg_2d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void RGG2D::GenerateCells(const SInt chunk_id) {
155155
seed = config_.seed + chunk_id * cells_per_chunk_ + i + total_chunks_ * cells_per_chunk_;
156156
SInt h = sampling::Spooky::hash(seed);
157157
// due to potential floating point inaccuracies clamp probability
158-
SInt cell_vertices = rng_.GenerateBinomial(h, n, std::clamp(cell_area / total_area, 0.0, 0.1));
158+
SInt cell_vertices = rng_.GenerateBinomial(h, n, std::clamp(cell_area / total_area, 0.0, 1.0));
159159
LPFloat cell_start_x = std::get<1>(chunk) + (i / cells_per_dim_) * cell_size_;
160160
LPFloat cell_start_y = std::get<2>(chunk) + (i % cells_per_dim_) * cell_size_;
161161

0 commit comments

Comments
 (0)