Beatsaber Rust Utilities: A Beatsaber V3 parsing library.
beatsaber beatmap
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added `inline` to filter methods.

+5
+5
src/difficulty/lightshow/filter.rs
··· 41 41 parameter1: 1, 42 42 parameter2: 0, 43 43 reverse: LooseBool::False, 44 + // Todo 44 45 chunks: None, 45 46 random_behaviour: None, 46 47 random_seed: None, ··· 57 58 /// # Panics 58 59 /// Will panic if the light ID is greater than or equal to the group size. 59 60 #[must_use] 61 + #[inline] 60 62 pub fn is_in_filter(&self, mut light_id: i32, group_size: i32) -> bool { 61 63 assert!(light_id < group_size); 62 64 ··· 82 84 /// # Unknown 83 85 /// If the [`FilterType`] is `Unknown` then the result will be the same as `group_size`. 84 86 #[must_use] 87 + #[inline] 85 88 pub fn count_filtered(&self, group_size: i32) -> i32 { 86 89 match self.filter_type { 87 90 FilterType::Division => { ··· 102 105 /// # Panics 103 106 /// Will panic if the light ID is greater than or equal to the group size. 104 107 #[must_use] 108 + #[inline] 105 109 pub fn get_relative_index(&self, mut light_id: i32, group_size: i32) -> i32 { 106 110 assert!(light_id < group_size); 107 111 ··· 248 252 parameter2: 1, 249 253 ..Default::default() 250 254 }; 255 + 251 256 println!("{outer}"); 252 257 assert!((0..outer).all(|i| !filter.is_in_filter(i, 12))); 253 258 assert!((outer..12).all(|i| filter.is_in_filter(i, 12)));