From f8aa5cc920c054ab9515b4f1c5704e5a4a5ebe66 Mon Sep 17 00:00:00 2001 From: Godzil Date: Thu, 5 Mar 2020 15:15:20 +0000 Subject: [PATCH] Fix a "bug" in UV Image introduced while debugging --- source/uvpattern/uv_image.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/uvpattern/uv_image.h b/source/uvpattern/uv_image.h index 3b3da6e..a001cdf 100644 --- a/source/uvpattern/uv_image.h +++ b/source/uvpattern/uv_image.h @@ -32,8 +32,8 @@ public: Colour uvPatternAt(double u, double v) { v = 1 - v; - double x = u * (this->image->width/2.0 - 1); - double y = v * (this->image->height/2.0 - 1); + double x = u * (this->image->width - 1); + double y = v * (this->image->height - 1); Colour ret = this->image->getPixel(round(x), round(y)); return ret;