fix mistake with x instead of y

Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
Sergey Isakov 2020-02-26 23:57:58 +03:00
parent 297b3601bf
commit 02108d8f48

View File

@ -313,7 +313,7 @@ static void nsvg__addEdge(NSVGrasterizer* r, float x0, float y0, float x1, float
static float nsvg__normalize(float *x, float* y) static float nsvg__normalize(float *x, float* y)
{ {
// float d = sqrtf((*x)*(*x) + (*y)*(*y)); // float d = sqrtf((*x)*(*x) + (*y)*(*y));
float d = SqrtF(SqrF(*x) + SqrF(*x)); float d = SqrtF(SqrF(*x) + SqrF(*y));
if (d > 1e-6f) { if (d > 1e-6f) {
float id = 1.0f / d; float id = 1.0f / d;
*x *= id; *x *= id;