summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md (renamed from changelog.md)5
-rw-r--r--source/benoit/benoit/application/render.rs10
2 files changed, 14 insertions, 1 deletions
diff --git a/changelog.md b/CHANGELOG.md
index aac0e81..c4ddd7d 100644
--- a/changelog.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+# 14
+
+* Update colouring
+* Rename changelog file: changelog.md => CHANGELOG.md
+
# 13
* Update render message
diff --git a/source/benoit/benoit/application/render.rs b/source/benoit/benoit/application/render.rs
index cc5b9ce..f612df2 100644
--- a/source/benoit/benoit/application/render.rs
+++ b/source/benoit/benoit/application/render.rs
@@ -82,7 +82,15 @@ impl Application {
let iteration_count = data[pixel as usize];
- let factor = iteration_count as f32 / 64.0 % 1.0;
+ let factor = {
+ let factor = iteration_count as f32 / 64.0 % 1.0;
+
+ (if factor >= 1.0 / 2.0 {
+ 1.0 - factor
+ } else {
+ factor
+ }) * 2.0
+ };
let value: u8 = if iteration_count != self.maximum_iteration_count {
(factor * 255.0).round() as u8