FX: Usermod Temperature effect

This commit is contained in:
Blaz Kristan
2024-09-15 11:04:02 +02:00
parent 0806c7fbdb
commit 65a8dbfe41
5 changed files with 28 additions and 12 deletions

View File

@@ -612,3 +612,8 @@ uint8_t get_random_wheel_index(uint8_t pos) {
}
return r;
}
// float version of map()
float mapf(float x, float in_min, float in_max, float out_min, float out_max) {
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}