File tree 4 files changed +5
-29
lines changed
4 files changed +5
-29
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ impl TaskPoolThreadAssignmentPolicy {
27
27
// Clamp by min_threads, max_threads. (This may result in us using more threads than are
28
28
// available, this is intended. An example case where this might happen is a device with
29
29
// <= 2 threads.
30
- bevy_math :: clamp ( desired , self . min_threads , self . max_threads )
30
+ desired . clamp ( self . min_threads , self . max_threads )
31
31
}
32
32
}
33
33
@@ -94,11 +94,8 @@ impl DefaultTaskPoolOptions {
94
94
95
95
/// Inserts the default thread pools into the given resource map based on the configured values
96
96
pub fn create_default_pools ( & self , world : & mut World ) {
97
- let total_threads = bevy_math:: clamp (
98
- bevy_tasks:: logical_core_count ( ) ,
99
- self . min_total_threads ,
100
- self . max_total_threads ,
101
- ) ;
97
+ let total_threads =
98
+ bevy_tasks:: logical_core_count ( ) . clamp ( self . min_total_threads , self . max_total_threads ) ;
102
99
trace ! ( "Assigning {} cores to default task pools" , total_threads) ;
103
100
104
101
let mut remaining_threads = total_threads;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- mod clamp;
2
1
mod face_toward;
3
2
mod geometry;
4
3
5
- pub use clamp:: * ;
6
4
pub use face_toward:: * ;
7
5
pub use geometry:: * ;
8
6
pub use glam:: * ;
Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ impl TextureAtlasBuilder {
177
177
Some ( rect_placements)
178
178
}
179
179
Err ( rectangle_pack:: RectanglePackError :: NotEnoughBinSpace ) => {
180
- current_height = bevy_math :: clamp ( current_height * 2 , 0 , max_height) ;
181
- current_width = bevy_math :: clamp ( current_width * 2 , 0 , max_width) ;
180
+ current_height = ( current_height * 2 ) . clamp ( 0 , max_height) ;
181
+ current_width = ( current_width * 2 ) . clamp ( 0 , max_width) ;
182
182
None
183
183
}
184
184
} ;
You can’t perform that action at this time.
0 commit comments