Mercurial > molko
view doc/docs/dev/api/core/maths.md @ 477:66e7f5fa7b78
misc: update .clang
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 27 Feb 2023 12:49:36 +0100 |
parents | cc0f02ae9005 |
children |
line wrap: on
line source
# Module: maths Synopsis ```c #include <core/maths.h> ``` Basic maths. ## Functions ### maths\_is\_boxed Check if the coordinates `px`, `py` are withing the bounding rectangle specified by `x`, `y`, `w` and `h`. ```c bool maths_is_boxed(int x, int y, unsigned int w, unsigned int h, int px, int py) ``` ### maths\_scale Scale a the value `v` from the range `[omin..omax]` to `[nmin..nmax]`. ```c float maths_scale(float v, float omin, float omax, float nmin, float nmax) ```