1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00

Point: Disable rotatedAroundOrigin for non-floating-point types

This function cant't give useful results for integer points.
This commit is contained in:
reuk 2024-04-29 16:03:44 +01:00
parent a0c9a42dbf
commit c728d8509d
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -195,6 +195,7 @@ public:
/** Returns the point that would be reached by rotating this point clockwise
about the origin by the specified angle.
*/
template <typename T = ValueType, std::enable_if_t<std::is_floating_point_v<T>, int> = 0>
Point rotatedAboutOrigin (ValueType angleRadians) const noexcept
{
return Point (x * std::cos (angleRadians) - y * std::sin (angleRadians),