mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Error instead of crash when love.graphics.newScreenshot fails
This commit is contained in:
@@ -104,7 +104,7 @@ void Matrix::setTranslation(float x, float y)
|
||||
void Matrix::setRotation(float rad)
|
||||
{
|
||||
setIdentity();
|
||||
float c = cos(rad), s = sin(rad);
|
||||
float c = cosf(rad), s = sinf(rad);
|
||||
e[0] = c;
|
||||
e[4] = -s;
|
||||
e[1] = s;
|
||||
@@ -128,7 +128,7 @@ void Matrix::setShear(float kx, float ky)
|
||||
void Matrix::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
|
||||
{
|
||||
memset(e, 0, sizeof(float)*16); // zero out matrix
|
||||
float c = cos(angle), s = sin(angle);
|
||||
float c = cosf(angle), s = sinf(angle);
|
||||
// matrix multiplication carried out on paper:
|
||||
// |1 x| |c -s | |sx | | 1 ky | |1 -ox|
|
||||
// | 1 y| |s c | | sy | |kx 1 | | 1 -oy|
|
||||
|
||||
Reference in New Issue
Block a user