Skip to content

Commit 8ed36b7

Browse files
Min/Max
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
1 parent ad467f7 commit 8ed36b7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

node-graph/nodes/vector/src/generator_nodes.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,13 @@ fn aperiodic_tiling(
410410
#[default(100., 100.)]
411411
culling_bound_max: DVec2,
412412
) -> Table<Vector> {
413-
let culling_bounds = if cull_viewport { Some([culling_bound_min, culling_bound_max]) } else { None };
413+
let culling_bounds = if cull_viewport {
414+
let min = culling_bound_min.min(culling_bound_max);
415+
let max = culling_bound_min.max(culling_bound_max);
416+
Some([min, max])
417+
} else {
418+
None
419+
};
414420
let vector = crate::aperiodic_tiling::generate_hat_tiling(levels, scale, culling_bounds);
415421
Table::new_from_element(vector)
416422
}

0 commit comments

Comments
 (0)