File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -148,21 +148,15 @@ pub fn render_from_config(config: &Config) -> Result<RgbImage> {
148
148
return Err ( Error :: ConfigError ( format ! ( "Unsupported dimension: {}" , config. ndims) ) ) ;
149
149
}
150
150
151
- // Create RNG for IFS generation
152
- let mut rng_for_ifs = match config. rng_name . as_str ( ) {
151
+ // Create RNG
152
+ let mut rng = match config. rng_name . as_str ( ) {
153
153
"Xoshiro256PlusPlus" => Xoshiro256PlusPlus :: seed_from_u64 ( config. seed ) ,
154
154
_ => return Err ( Error :: ConfigError ( format ! ( "Unknown RNG: {}" , config. rng_name) ) ) ,
155
155
} ;
156
156
157
157
// Create IFS
158
- let ifs = crate :: core:: ifs:: rand_sigma_factor_ifs ( & mut rng_for_ifs) ;
159
-
160
- // Create a new RNG for rendering with the same seed
161
- let rng_for_render = match config. rng_name . as_str ( ) {
162
- "Xoshiro256PlusPlus" => Xoshiro256PlusPlus :: seed_from_u64 ( config. seed ) ,
163
- _ => return Err ( Error :: ConfigError ( format ! ( "Unknown RNG: {}" , config. rng_name) ) ) ,
164
- } ;
158
+ let ifs = crate :: core:: ifs:: rand_sigma_factor_ifs ( & mut rng) ;
165
159
166
160
// Render image
167
- Ok ( render ( rng_for_render , & ifs, config) )
161
+ Ok ( render ( rng , & ifs, config) )
168
162
}
You can’t perform that action at this time.
0 commit comments