aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-02-07 00:37:58 +0100
committerJulian T <julian@jtle.dk>2021-02-07 00:37:58 +0100
commitf3f56ed5f183f8461cc91cb6430d97c725ba159c (patch)
tree32d07fc105185849b8bf6bfe1fd63bf85f976410 /src/main.rs
parentb64c7e972c52b7d015d661866f0cf902370343e5 (diff)
Move to double to avoid rounding error
This rounding errors seems to happen when adding floats very close to 1 to a relatively large number. 325.0 + 0.99999034 = 326.0 This is a problem as this sample should be counted at the 325 pixel. However this will be a lesser problem when filtering is implemented.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index c6bc14e..1604ae3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -32,7 +32,7 @@ fn main() {
let mut film = Film::new(res);
let tile = film.get_tile(&film.frame);
- let mut task = RenderTask::new(Box::new(tile), 10);
+ let mut task = RenderTask::new(Box::new(tile), 100);
task.render(&ctx, &mut sampler);
film.commit_tile(&task.tile);