mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
chore: fix some comments (#13083)
# Objective remove repetitive words Signed-off-by: findmyhappy <findhappy@sohu.com>
This commit is contained in:
parent
414abb4959
commit
36a3e53e10
5 changed files with 7 additions and 6 deletions
|
@ -41,7 +41,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryParIter<'w, 's, D, F> {
|
|||
/// Runs `func` on each query result in parallel on a value returned by `init`.
|
||||
///
|
||||
/// `init` may be called multiple times per thread, and the values returned may be discarded between tasks on any given thread.
|
||||
/// Callers should avoid using this function as if it were a a parallel version
|
||||
/// Callers should avoid using this function as if it were a parallel version
|
||||
/// of [`Iterator::fold`].
|
||||
///
|
||||
/// # Example
|
||||
|
|
|
@ -1320,7 +1320,7 @@ pub(crate) fn assign_lights_to_clusters(
|
|||
// scale x and y cluster count to be able to fit all our indices
|
||||
|
||||
// we take the ratio of the actual indices over the index estimate.
|
||||
// this not not guaranteed to be small enough due to overlapped tiles, but
|
||||
// this is not guaranteed to be small enough due to overlapped tiles, but
|
||||
// the conservative estimate is more than sufficient to cover the
|
||||
// difference
|
||||
let index_ratio = ViewClusterBindings::MAX_INDICES as f32 / cluster_index_estimate;
|
||||
|
|
|
@ -68,7 +68,7 @@ of type `T`. If you've ever worked with C++, `NonNull<T>` is very close to a C++
|
|||
untyped memory address. Pointing at the unit type (or some other zero-sized type) just happens to be the convention. The only way to reasonably use them is to
|
||||
cast back to a typed pointer. They show up occasionally when dealing with FFI and the rare occasion where dynamic dispatch is required, but a trait is too
|
||||
constraining of an interface to work with. A great example of this are the [RawWaker] APIs, where a singular trait (or set of traits) may be insufficient to capture
|
||||
all usage patterns. `*mut ()` should only be used to carry the mutability of the target, and as there is no way to to mutate an unknown type.
|
||||
all usage patterns. `*mut ()` should only be used to carry the mutability of the target, and as there is no way to mutate an unknown type.
|
||||
|
||||
[RawWaker]: https://doc.rust-lang.org/std/task/struct.RawWaker.html
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ fn draw(in: VertexOutput) -> vec4<f32> {
|
|||
|
||||
// Signed distances. The magnitude is the distance of the point from the edge of the shape.
|
||||
// * Negative values indicate that the point is inside the shape.
|
||||
// * Zero values indicate the point is on on the edge of the shape.
|
||||
// * Zero values indicate the point is on the edge of the shape.
|
||||
// * Positive values indicate the point is outside the shape.
|
||||
|
||||
// Signed distance from the exterior boundary.
|
||||
|
|
|
@ -69,8 +69,9 @@ fn log_once_system() {
|
|||
info_once!("logs once per call site, so this works just fine: {}", i);
|
||||
}
|
||||
|
||||
// you can also use the 'once!' macro directly, in situations you want do do
|
||||
// something expensive only once within the context of a continuous system.
|
||||
// you can also use the `once!` macro directly,
|
||||
// in situations where you want to do something expensive only once
|
||||
// within the context of a continuous system.
|
||||
once!({
|
||||
info!("doing expensive things");
|
||||
let mut a: u64 = 0;
|
||||
|
|
Loading…
Reference in a new issue