From 8c7a35addb2cccef72f4faacc72f6fda6692b1f1 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 30 Jul 2013 17:16:56 +0100 Subject: [PATCH] Fixed some obscure rounding errors in Rectangle. --- modules/juce_graphics/geometry/juce_Rectangle.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/juce_graphics/geometry/juce_Rectangle.h b/modules/juce_graphics/geometry/juce_Rectangle.h index a593b797ca..4ac28f9784 100644 --- a/modules/juce_graphics/geometry/juce_Rectangle.h +++ b/modules/juce_graphics/geometry/juce_Rectangle.h @@ -698,10 +698,10 @@ public: template Rectangle getSmallestIntegerContainerWithType() const noexcept { - const IntType x1 = static_cast (std::floor (static_cast (pos.x))); - const IntType y1 = static_cast (std::floor (static_cast (pos.y))); - const IntType x2 = static_cast (std::ceil (static_cast (pos.x + w))); - const IntType y2 = static_cast (std::ceil (static_cast (pos.y + h))); + const IntType x1 = static_cast (std::floor (pos.x)); + const IntType y1 = static_cast (std::floor (pos.y)); + const IntType x2 = static_cast (std::ceil (pos.x + w)); + const IntType y2 = static_cast (std::ceil (pos.y + h)); return Rectangle (x1, y1, x2 - x1, y2 - y1); }