Skip to content
Myr

Change double literals 0.5 to float type

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by unknown · committed by unknown · parent bdef693 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:stb_truetype.h+4 added-4 removed
2033 unmodified lines
2034{2035 float d3d_bias = opengl_fillrule ? 0 : -0.5f;2036 float ipw = 1.0f / pw, iph = 1.0f / ph;2037 stbtt_bakedchar *b = chardata + char_index;2038 int round_x = STBTT_ifloor((*xpos + b->xoff) + 0.5);2039 int round_y = STBTT_ifloor((*ypos + b->yoff) + 0.5);2038 int round_x = STBTT_ifloor((*xpos + b->xoff) + 0.5f);2039 int round_y = STBTT_ifloor((*ypos + b->yoff) + 0.5f);20402041 q->x0 = round_x + d3d_bias;2042 q->y0 = round_y + d3d_bias;2043 q->x1 = round_x + b->x1 - b->x0 + d3d_bias;
382 unmodified lines
2426 float ipw = 1.0f / pw, iph = 1.0f / ph;2427 stbtt_packedchar *b = chardata + char_index;24282429 if (align_to_integer) {2430 float x = (float) STBTT_ifloor((*xpos + b->xoff) + 0.5);2431 float y = (float) STBTT_ifloor((*ypos + b->yoff) + 0.5);2430 float x = (float) STBTT_ifloor((*xpos + b->xoff) + 0.5f);2431 float y = (float) STBTT_ifloor((*ypos + b->yoff) + 0.5f);2432 q->x0 = x;2433 q->y0 = y;2434 q->x1 = x + b->xoff2 - b->xoff;2435 q->y1 = y + b->yoff2 - b->yoff;
177 unmodified lines