From 18c896f45b69607cad9e3004dcc8fa61c1503385 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 2 Dec 2016 11:27:04 +0000 Subject: [PATCH] Changed Line::getPointAlongLineProportionally method to work properly with integers --- modules/juce_graphics/geometry/juce_Line.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_graphics/geometry/juce_Line.h b/modules/juce_graphics/geometry/juce_Line.h index 3223f836fd..dfd95cadd9 100644 --- a/modules/juce_graphics/geometry/juce_Line.h +++ b/modules/juce_graphics/geometry/juce_Line.h @@ -249,9 +249,9 @@ public: can be negative or greater than 1.0). @see getPointAlongLine */ - Point getPointAlongLineProportionally (ValueType proportionOfLength) const noexcept + Point getPointAlongLineProportionally (typename Point::FloatType proportionOfLength) const noexcept { - return start + (end - start) * proportionOfLength; + return start + Point ((end - start) * proportionOfLength); } /** Returns the smallest distance between this line segment and a given point.