From df3624c6c8bc5504c660d8bd3b1765e90c33f245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 25 Aug 2015 22:34:00 +0200 Subject: [PATCH] Math: fix implicit conversion warnings on MSVC. --- src/Magnum/Math/Angle.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Magnum/Math/Angle.h b/src/Magnum/Math/Angle.h index 021900922..411f08a47 100644 --- a/src/Magnum/Math/Angle.h +++ b/src/Magnum/Math/Angle.h @@ -163,7 +163,7 @@ Double cosine = Math::cos(1.047_rad); // cosine = 0.5 @see @link operator""_degf() @endlink, @link operator""_rad() @endlink @requires_gl Only single-precision types are available in OpenGL ES and WebGL. */ -constexpr Deg operator "" _deg(long double value) { return Deg(value); } +constexpr Deg operator "" _deg(long double value) { return Deg(Double(value)); } #endif /** @relatesalso Deg @@ -176,7 +176,7 @@ Float tangent = Math::tan(1.047_radf); // tangent = 1.732f @endcode @see @link operator""_deg() @endlink, @link operator""_radf() @endlink */ -constexpr Deg operator "" _degf(long double value) { return Deg(value); } +constexpr Deg operator "" _degf(long double value) { return Deg(Float(value)); } /** @brief Angle in radians @@ -222,7 +222,7 @@ See @link operator""_deg() @endlink for more information. @see @link operator""_radf() @endlink @requires_gl Only single-precision types are available in OpenGL ES and WebGL. */ -constexpr Rad operator "" _rad(long double value) { return Rad(value); } +constexpr Rad operator "" _rad(long double value) { return Rad(Double(value)); } #endif /** @relatesalso Rad @@ -231,7 +231,7 @@ constexpr Rad operator "" _rad(long double value) { return Rad(v See @link operator""_degf() @endlink for more information. @see @link operator""_rad() @endlink */ -constexpr Rad operator "" _radf(long double value) { return Rad(value); } +constexpr Rad operator "" _radf(long double value) { return Rad(Float(value)); } template constexpr Deg::Deg(Unit value): Unit(T(180)*T(value)/Math::Constants::pi()) {} template constexpr Rad::Rad(Unit value): Unit(T(value)*Math::Constants::pi()/T(180)) {}