diff --git a/modules/juce_graphics/geometry/juce_Line.h b/modules/juce_graphics/geometry/juce_Line.h index c4463f5b64..ce07dc4903 100644 --- a/modules/juce_graphics/geometry/juce_Line.h +++ b/modules/juce_graphics/geometry/juce_Line.h @@ -323,7 +323,8 @@ public: */ Point findNearestPointTo (Point point) const noexcept { - return getPointAlongLineProportionally (findNearestProportionalPositionTo (point)); + using FloatType = typename Point::FloatType; + return getPointAlongLineProportionally ((FloatType) findNearestProportionalPositionTo (point)); } /** Returns true if the given point lies above this line.