Skip to content

Instantly share code, notes, and snippets.

View miunau's full-sized avatar
💭
🦦 🦦 🦦 🦦 🦦 🦦

miunau miunau

💭
🦦 🦦 🦦 🦦 🦦 🦦
View GitHub Profile
@kaievns
kaievns / fake_math.c
Last active October 26, 2024 05:26
Fake math.h substitute for embedded systems to calculate sin/cos values
/**
* A super simple sin/cos substitute based on taylor sequences
* to avoid importing the math.h
*
* sin x = x - x^3/3! + x^5/5! -x^7/7! ...
* cos x = 1 -x^2/2!+x^4/4!-x^6/6! ...
*/
// #include "math.h"
// #include <zephyr/kernel.h>