Skip to content

Commit 831e1c7

Browse files
Update crates/bevy_ecs/src/query/access.rs docs
Co-authored-by: Alice Cecile <[email protected]>
1 parent 0d50b8c commit 831e1c7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

crates/bevy_ecs/src/query/access.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ impl<T: SparseSetIndex> FilteredAccess<T> {
272272

273273
/// Adds a `With` filter: corresponds to a conjunction (AND) operation.
274274
///
275-
/// For example, in case we have `Or<(With<A>, With<B>)>`, which is represented by an array of two `AccessFilter` instances,
276-
/// adding `AND With<C>` gets expanded into `Or<((With<A>, With<C>), (With<B>, With<C>))>`.
275+
/// Suppose we begin with `Or<(With<A>, With<B>)>`, which is represented by an array of two `AccessFilter` instances.
276+
/// Adding `AND With<C>` via this method transforms it into the equivalent of `Or<((With<A>, With<C>), (With<B>, With<C>))>`.
277277
pub fn and_with(&mut self, index: T) {
278278
let index = index.sparse_set_index();
279279
for filter in &mut self.filter_sets {
@@ -284,8 +284,8 @@ impl<T: SparseSetIndex> FilteredAccess<T> {
284284

285285
/// Adds a `Without` filter: corresponds to a conjunction (AND) operation.
286286
///
287-
/// For example, in case we have `Or<(With<A>, With<B>)>`, which is represented by an array of two `AccessFilter` instances,
288-
/// adding `AND Without<C>` gets expanded into `Or<((With<A>, Without<C>), (With<B>, Without<C>))>`.
287+
/// Suppose we begin with `Or<(With<A>, With<B>)>`, which is represented by an array of two `AccessFilter` instances.
288+
/// Adding `AND Without<C>` via this method transforms it into the equivalent of `Or<((With<A>, Without<C>), (With<B>, Without<C>))>`.
289289
pub fn and_without(&mut self, index: T) {
290290
let index = index.sparse_set_index();
291291
for filter in &mut self.filter_sets {
@@ -315,7 +315,7 @@ impl<T: SparseSetIndex> FilteredAccess<T> {
315315

316316
// If the access instances are incompatible, we want to check that whether filters can
317317
// guarantee that queries are disjoint.
318-
// Since the `filter_sets` array represents a DNF formula ("ORs of ANDs"),
318+
// Since the `filter_sets` array represents a Disjunctive Normal Form formula ("ORs of ANDs"),
319319
// we need to make sure that each filter set (ANDs) rule out every filter set from the `other` instance.
320320
//
321321
// For example, `Query<&mut C, Or<(With<A>, Without<B>)>>` is compatible `Query<&mut C, (With<B>, Without<A>)>`,

0 commit comments

Comments
 (0)