mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Line: Avoid data loss warning in Line::findNearestPointTo
This commit is contained in:
parent
5ff13aa6b1
commit
0f0095091b
1 changed files with 2 additions and 1 deletions
|
|
@ -323,7 +323,8 @@ public:
|
|||
*/
|
||||
Point<ValueType> findNearestPointTo (Point<ValueType> point) const noexcept
|
||||
{
|
||||
return getPointAlongLineProportionally (findNearestProportionalPositionTo (point));
|
||||
using FloatType = typename Point<ValueType>::FloatType;
|
||||
return getPointAlongLineProportionally ((FloatType) findNearestProportionalPositionTo (point));
|
||||
}
|
||||
|
||||
/** Returns true if the given point lies above this line.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue