summaryrefslogtreecommitdiffhomepage
path: root/dev/Modules/FB/Math.h
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-12-07 11:43:21 +0100
committerAmlal <amlalelmahrouss@icloud.com>2024-12-07 11:43:21 +0100
commitdc2d81f3c7628433bd3c51f1624200b3913ac746 (patch)
treeace444d1b284160ae83350a8f5fd5364e8fa81eb /dev/Modules/FB/Math.h
parentb4ea651f87e23214ada3cc81086fa0e86d4697c9 (diff)
IMPL: Recover Kernel Window framework from previous commits.
IMPL: Compiler fixes and improvements on the source code. Signed-off-by: Amlal <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/Modules/FB/Math.h')
-rw-r--r--dev/Modules/FB/Math.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/dev/Modules/FB/Math.h b/dev/Modules/FB/Math.h
new file mode 100644
index 00000000..3ccbaf5d
--- /dev/null
+++ b/dev/Modules/FB/Math.h
@@ -0,0 +1,22 @@
+/* -------------------------------------------
+
+ Copyright ZKA Technologies.
+
+------------------------------------------- */
+
+#pragma once
+
+/// @file Math.h
+/// @brief Linear interpolation implementation.
+
+typedef float CGReal;
+
+/// @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)
+{
+ CGReal difference = to - from;
+ return from + (difference * stat);
+}