From 1fcf30ada021e5bbd7f1ed7deff39dbfb91895f5 Mon Sep 17 00:00:00 2001 From: Jorge Rodriguez Date: Tue, 29 Jul 2014 00:33:29 -0700 Subject: [PATCH] Fix a math error. --- stb_resample.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_resample.h b/stb_resample.h index e577f0f..963f7ff 100644 --- a/stb_resample.h +++ b/stb_resample.h @@ -292,7 +292,7 @@ static float stbr__filter_catmullrom(float x) x = (float)fabs(x); if (x < 1.0f) - return 1 - x*x*(1.5f - 2.5f*x); + return 1 - x*x*(2.5f - 1.5f*x); else if (x < 2.0f) return 2 - x*(4 + x*(0.5f*x - 2.5f));