From 95681a7a05a20d30c0b61f34ee41658e06fa31ae Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 25 Jun 2024 09:49:25 +0300 Subject: [PATCH] LibImage: Cleanup bicubic calculations --- userspace/libraries/LibImage/Image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userspace/libraries/LibImage/Image.cpp b/userspace/libraries/LibImage/Image.cpp index 5c683e67..0fe4fc52 100644 --- a/userspace/libraries/LibImage/Image.cpp +++ b/userspace/libraries/LibImage/Image.cpp @@ -163,7 +163,7 @@ namespace LibImage const auto b = p[0] + (p[1] * -2.5) + (p[2] * 2.0) + (p[3] * -0.5); const auto c = (p[0] * -0.5) + (p[2] * 0.5); const auto d = p[1]; - return (a * x * x * x) + (b * x * x) + (c * x) + d; + return ((a * x + b) * x + c) * x + d; }; for (uint64_t y = 0; y < new_height; y++)