-
Notifications
You must be signed in to change notification settings - Fork 0
/
math.c
18 lines (16 loc) · 1.01 KB
/
math.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* ************************************************************************** */
/* */
/* :::::::: */
/* math.c :+: :+: */
/* +:+ */
/* By: jandre-d <[email protected]> +#+ */
/* +#+ */
/* Created: 2019/03/26 15:08:08 by jandre-d #+# #+# */
/* Updated: 2019/03/30 20:10:43 by jandre-d ######## odam.nl */
/* */
/* ************************************************************************** */
#include "math.h"
double map(double x, double in_max, double out_min, double out_max)
{
return (x * (out_max - out_min) / in_max + out_min);
}