diff --git a/modules/juce_graphics/geometry/juce_Point.h b/modules/juce_graphics/geometry/juce_Point.h index 9e1bb0fa0c..6f8f86385d 100644 --- a/modules/juce_graphics/geometry/juce_Point.h +++ b/modules/juce_graphics/geometry/juce_Point.h @@ -155,8 +155,10 @@ public: /** Returns the angle from this point to another one. - The return value is the number of radians clockwise from the 12 o'clock direction, - where this point is the centre and the other point is on the circumference. + Taking this point to be the centre of a circle, and the other point being a position on + the circumference, the return value is the number of radians clockwise from the 12 o'clock + direction. + So 12 o'clock = 0, 3 o'clock = Pi/2, 6 o'clock = Pi, 9 o'clock = -Pi/2 */ FloatType getAngleToPoint (Point other) const noexcept { @@ -233,5 +235,9 @@ public: ValueType y; /**< The point's Y coordinate. */ }; +/** Multiplies the point's coordinates by a scalar value. */ +template +Point operator* (ValueType value, Point p) noexcept { return p * value; } + #endif // JUCE_POINT_H_INCLUDED