Browse Source

Disambiguation in Point::getAngleToPoint

tags/2021-05-28
jules 11 years ago
parent
commit
b0933193bf
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      modules/juce_graphics/geometry/juce_Point.h

+ 2
- 1
modules/juce_graphics/geometry/juce_Point.h View File

@@ -151,7 +151,8 @@ public:
*/
FloatType getAngleToPoint (Point other) const noexcept
{
return static_cast<FloatType> (std::atan2 (other.x - x, y - other.y));
return static_cast<FloatType> (std::atan2 (static_cast<FloatType> (other.x - x),
static_cast<FloatType> (y - other.y)));
}
/** Returns the point that would be reached by rotating this point clockwise


Loading…
Cancel
Save