Skip to main content

sm64_binds/sm64/
rng_config.rs

1#[derive(Debug, Clone, Copy)]
2pub struct RngConfig {
3    pub window_length: u32,
4    pub random_amount: u32,
5    pub random_burst_length: u32,
6    pub a_prob: f32,
7    pub b_prob: f32,
8    pub z_prob: f32,
9}
10impl RngConfig {
11    pub const fn default() -> Self {
12        RngConfig::new(
13            100, 
14            5, 
15            2,
16            0.5, 
17            0.5, 
18            0.2)
19    }
20
21    pub const fn new(window_length: u32, random_amount: u32, random_burst_length: u32, a_prob: f32, b_prob: f32, z_prob: f32) -> Self {
22        return RngConfig { 
23            window_length, 
24            random_amount,
25            random_burst_length,
26            a_prob, 
27            b_prob,
28            z_prob 
29        }
30    }
31}