Clarify atan2 overloads
In the C++ standard, this function is only defined for floating point types, and integers cannot be implicitly converted. Using explicit conversions avoids a GCC specific extension to the standard library.
This commit is contained in:
committed by
Chris Pavlina
parent
ef582c07f3
commit
ff4febc7a8
@@ -298,7 +298,7 @@ typename VECTOR2<T>::extended_type VECTOR2<T>::SquaredEuclideanNorm() const
|
||||
template <class T>
|
||||
double VECTOR2<T>::Angle() const
|
||||
{
|
||||
return atan2( y, x );
|
||||
return atan2( (double) y, (double) x );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user