summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/benoit/benoit/application/colour.rs4
-rw-r--r--source/benoit/benoit/configuration/default.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/benoit/benoit/application/colour.rs b/source/benoit/benoit/application/colour.rs
index 701d49f..d734f65 100644
--- a/source/benoit/benoit/application/colour.rs
+++ b/source/benoit/benoit/application/colour.rs
@@ -33,9 +33,9 @@ impl Application {
let (red, green, blue) = if iteration_count != self.maximum_iteration_count {
let distance = square_distance_buffer[pixel as usize].sqrt();
- let mut factor = (iteration_count as f32 + 1.0 - distance.log2().log2()) / 16.0 % 1.0;
+ let factor_range = 16.0_f32.min(self.maximum_iteration_count as f32);
- factor %= 1.0;
+ let mut factor = (iteration_count as f32 + 1.0 - distance.log2().log2()) / factor_range % 1.0;
factor = (if factor >= 1.0 / 2.0 {
1.0 - factor
diff --git a/source/benoit/benoit/configuration/default.rs b/source/benoit/benoit/configuration/default.rs
index 5442a99..b8649b5 100644
--- a/source/benoit/benoit/configuration/default.rs
+++ b/source/benoit/benoit/configuration/default.rs
@@ -43,7 +43,7 @@ impl Configuration {
center_real: Float::with_val(PRECISION, 0.0),
center_imaginary: Float::with_val(PRECISION, 0.0),
- zoom: Float::with_val(PRECISION, 1.0 / 4.0),
+ zoom: Float::with_val(PRECISION, 1.0),
maximum_iteration_count: 0x100,
dump_path: "./render/".to_string(),