From d7a44685a82ce1cb5f5d5dfdee453a445f316238 Mon Sep 17 00:00:00 2001 From: yakov Date: Tue, 23 Mar 2021 00:37:50 -0400 Subject: [PATCH] use STBTT_fabs --- stb_truetype.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stb_truetype.h b/stb_truetype.h index ddc7778..92d4725 100644 --- a/stb_truetype.h +++ b/stb_truetype.h @@ -4636,8 +4636,8 @@ STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float sc float a = 3*(ax*bx + ay*by); float b = 2*(ax*ax + ay*ay) + (mx*bx+my*by); float c = mx*ax+my*ay; - if (fabs(a) < eps2) { // if a is 0, it's linear - if (fabs(b) >= eps2) { + if (STBTT_fabs(a) < eps2) { // if a is 0, it's linear + if (STBTT_fabs(b) >= eps2) { res[num++] = -c/b; } } else {