1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Changed Line::getPointAlongLineProportionally method to work properly with integers

This commit is contained in:
ed 2016-12-02 11:27:04 +00:00
parent 910cab77a1
commit 18c896f45b

View file

@ -249,9 +249,9 @@ public:
can be negative or greater than 1.0).
@see getPointAlongLine
*/
Point<ValueType> getPointAlongLineProportionally (ValueType proportionOfLength) const noexcept
Point<ValueType> getPointAlongLineProportionally (typename Point<ValueType>::FloatType proportionOfLength) const noexcept
{
return start + (end - start) * proportionOfLength;
return start + Point<ValueType> ((end - start) * proportionOfLength);
}
/** Returns the smallest distance between this line segment and a given point.