Replaced C standard headers (<xxx.h>) with their C++ version (<cxxx>)
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1545 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
41b29f45f8
commit
ff2c4f2ee7
20 changed files with 48 additions and 53 deletions
|
@ -31,7 +31,7 @@
|
|||
#include <SFML/Config.hpp>
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
#include <SFML/Graphics/Rect.hpp>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
|
||||
namespace sf
|
||||
|
|
|
@ -108,8 +108,8 @@ inline Matrix3 Matrix3::Transformation(const Vector2f& origin, const Vector2f& t
|
|||
{
|
||||
// Combine the transformations
|
||||
float angle = rotation * 3.141592654f / 180.f;
|
||||
float cosine = static_cast<float>(cos(angle));
|
||||
float sine = static_cast<float>(sin(angle));
|
||||
float cosine = static_cast<float>(std::cos(angle));
|
||||
float sine = static_cast<float>(std::sin(angle));
|
||||
float sxCos = scale.x * cosine;
|
||||
float syCos = scale.y * cosine;
|
||||
float sxSin = scale.x * sine;
|
||||
|
@ -129,8 +129,8 @@ inline Matrix3 Matrix3::Projection(const Vector2f& center, const Vector2f& size,
|
|||
{
|
||||
// Rotation components
|
||||
float angle = rotation * 3.141592654f / 180.f;
|
||||
float cosine = static_cast<float>(cos(angle));
|
||||
float sine = static_cast<float>(sin(angle));
|
||||
float cosine = static_cast<float>(std::cos(angle));
|
||||
float sine = static_cast<float>(std::sin(angle));
|
||||
float tx = -center.x * cosine - center.y * sine + center.x;
|
||||
float ty = center.x * sine - center.y * cosine + center.y;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue