Inversed rotation angle in drawables, to make it match the Y axis pointing down in SFML (fixes issue #3)

This commit is contained in:
Laurent Gomila 2011-04-06 08:13:55 +02:00
parent ba8a36990f
commit f6bbbb6e6d

View File

@ -107,7 +107,7 @@ inline Matrix3 Matrix3::operator *(const Matrix3& right) const
inline Matrix3 Matrix3::Transformation(const Vector2f& origin, const Vector2f& translation, float rotation, const Vector2f& scale)
{
// Combine the transformations
float angle = rotation * 3.141592654f / 180.f;
float angle = -rotation * 3.141592654f / 180.f;
float cosine = static_cast<float>(std::cos(angle));
float sine = static_cast<float>(std::sin(angle));
float sxCos = scale.x * cosine;