Skip to content

Commit 45f6934

Browse files
committed
type params check
1 parent 1f1904b commit 45f6934

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
1414
- simplify `CollisionQuery` trait
1515
- improve documentation
1616
- simplify dependencies
17+
- type params check
1718

1819
## [0.15.1-alpha5] - 2025-01-20
1920

bevy_quadtree/src/plugin.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ where
8383
P: TrackingPair,
8484
{
8585
fn build(&self, app: &mut App) {
86+
assert!(N > 0, "N should > 0");
87+
assert!(W > 0, "W should > 0");
88+
assert!(H > 0, "H should > 0");
89+
assert!(K >= 10, "K should >= 10");
8690
app.init_resource::<QuadTree<N, W, H, K, ID>>()
8791
.add_systems(PreUpdate, P::update_collision())
8892
.add_systems(Update, P::update_quadtree::<N, W, H, K, ID>());

0 commit comments

Comments
 (0)