we really should be using round, but why is it worse?

This commit is contained in:
Henry Schimke
2022-10-11 07:38:50 -05:00
parent c190933f5f
commit 81f6de2a8f
4 changed files with 4 additions and 4 deletions

View File

@@ -2363,7 +2363,7 @@ impl GridSampler for DefaultGridSampler {
let mut x = 0;
while x < max {
// for (int x = 0; x < max; x += 2) {
if image.get(points[x].floor() as u32, points[x + 1].floor() as u32) {
if image.get(points[x].round() as u32, points[x + 1].round() as u32) {
// Black(-ish) pixel
bits.set(x as u32 / 2, y);
}