summaryrefslogtreecommitdiffhomepage
path: root/dev/Modules/FB/Math.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-12-25 08:47:34 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-12-25 08:47:43 +0100
commitec23419517078d032187b5b5f204d4c78de8c964 (patch)
treeb36af28b30113579c12d14391467563bee76c52f /dev/Modules/FB/Math.h
parent738664e41b24ba7832d1ebe8dab8344d9440c5a1 (diff)
IMPL: Refactor the Graphics API of the OS (kernel side) (AppearanceMgr.h)
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Modules/FB/Math.h')
-rw-r--r--dev/Modules/FB/Math.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/dev/Modules/FB/Math.h b/dev/Modules/FB/Math.h
index 3ccbaf5d..123e9914 100644
--- a/dev/Modules/FB/Math.h
+++ b/dev/Modules/FB/Math.h
@@ -9,14 +9,18 @@
/// @file Math.h
/// @brief Linear interpolation implementation.
-typedef float CGReal;
+#ifdef ZKA_FB_USE_DOUBLE
+typedef double fb_real_t;
+#else
+typedef float fb_real_t;
+#endif
/// @brief Linear interpolation equation solver.
/// @param from where?
/// @param to to?
/// @param at which state we're at **to**.
-inline CGReal CGLerp(CGReal to, CGReal from, CGReal stat)
+inline fb_real_t fb_math_lerp(fb_real_t to, fb_real_t from, fb_real_t stat)
{
- CGReal difference = to - from;
+ fb_real_t difference = to - from;
return from + (difference * stat);
}