comparison doc/docs/dev/api/core/maths.md @ 288:cc0f02ae9005

core: add maths_scale function
author David Demelier <markand@malikania.fr>
date Thu, 07 Jan 2021 15:50:01 +0100
parents c4da052c0def
children
comparison
equal deleted inserted replaced
287:75d2fdf96064 288:cc0f02ae9005
17 17
18 ```c 18 ```c
19 bool 19 bool
20 maths_is_boxed(int x, int y, unsigned int w, unsigned int h, int px, int py) 20 maths_is_boxed(int x, int y, unsigned int w, unsigned int h, int px, int py)
21 ``` 21 ```
22
23 ### maths\_scale
24
25 Scale a the value `v` from the range `[omin..omax]` to `[nmin..nmax]`.
26
27 ```c
28 float
29 maths_scale(float v, float omin, float omax, float nmin, float nmax)
30 ```