Fix for C89 compilers. In compilers that only support C89 the variables must be declared first.

This commit is contained in:
Bryan McConkey 2014-08-18 16:00:39 -04:00
parent 671a4be4f3
commit 022f52ee94

View File

@ -436,11 +436,11 @@ static void nsvg__xformMultiply(float* t, float* s)
static void nsvg__xformInverse(float* inv, float* t)
{
double det = (double)t[0] * t[3] - (double)t[2] * t[1];
double invdet = 1.0 / det;
if (det > -1e-6 && det < -1e-6) {
nsvg__xformIdentity(t);
return;
}
double invdet = 1.0 / det;
inv[0] = (float)(t[3] * invdet);
inv[2] = (float)(-t[2] * invdet);
inv[4] = (float)(((double)t[2] * t[5] - (double)t[3] * t[4]) * invdet);