math_graphics.h angepasst;

lerp angepasst;

git-svn-id: svn://ammerhai.com/home/mike/pokemon_repo@21 24008968-59e6-ed4c-a10b-0b2c954b24ab
This commit is contained in:
mikeb
2021-07-27 16:28:15 +00:00
parent efc6477180
commit c7a9c2f78f
4 changed files with 34 additions and 28 deletions
-18
View File
@@ -257,24 +257,6 @@ void change_map_size(char direction, int amount) {
free(old_map);
}
float ilerp(float a, float b, float v) {
return (v - a) / (b - a);
}
V2 ilerp(V2 a, V2 b, V2 v) {
return (v - a) / (b - a);
}
float remap(float in_a, float in_b, float out_a, float out_b, float v) {
float t = ilerp(in_a, in_b, v);
return lerp(out_a, t, out_b);
}
V2 remap(V2 in_a, V2 in_b, V2 out_a, V2 out_b, V2 v) {
V2 t = ilerp(in_a, in_b, v);
return lerp(out_a, t, out_b);
}
//Userinputs, Steuerung, FensterÄnderungen -> WindowProc
LRESULT WindowMsgs(HWND Window, UINT Message, WPARAM wParam, LPARAM lParam) {
LRESULT Result = 0;