From a0c9a42dbfdd1279d00a80fa8e1781ee8581a008 Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 29 Apr 2024 15:58:53 +0100 Subject: [PATCH] Point: Avoid data-loss warning in Point::getDotProduct --- modules/juce_graphics/geometry/juce_Point.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_graphics/geometry/juce_Point.h b/modules/juce_graphics/geometry/juce_Point.h index 07f0144622..609339989b 100644 --- a/modules/juce_graphics/geometry/juce_Point.h +++ b/modules/juce_graphics/geometry/juce_Point.h @@ -223,7 +223,7 @@ public: } /** Returns the dot-product of two points (x1 * x2 + y1 * y2). */ - constexpr FloatType getDotProduct (Point other) const noexcept { return x * other.x + y * other.y; } + constexpr FloatType getDotProduct (Point other) const noexcept { return (FloatType) (x * other.x + y * other.y); } //============================================================================== /** Uses a transform to change the point's coordinates.