diff options
author | rodri <rgl@antares-labs.eu> | 2024-08-27 12:05:08 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-08-27 12:05:08 +0000 |
commit | 2c410b56f801708ec11a1af6cdd995d69e9db059 (patch) | |
tree | 06abcdaa277f02ee1138c82693cb72389ab1659c /graphics.h | |
parent | 5ebbe977e9a25feff261b7c5fbbfe7af777dd681 (diff) | |
download | libgraphics-2c410b56f801708ec11a1af6cdd995d69e9db059.tar.gz libgraphics-2c410b56f801708ec11a1af6cdd995d69e9db059.tar.bz2 libgraphics-2c410b56f801708ec11a1af6cdd995d69e9db059.zip |
replace f?(min|max) functions with type-agnostic macros.
this simplifies the code and serves as another
shadeop to use on application shaders.
Diffstat (limited to 'graphics.h')
-rw-r--r-- | graphics.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,6 @@ #define HZ2MS(hz) (1000/(hz)) +#define min(a, b) ((a)<(b)?(a):(b)) +#define max(a, b) ((a)>(b)?(a):(b)) typedef enum { ORTHOGRAPHIC, @@ -412,8 +414,6 @@ void freecubemap(Cubemap*); Color samplecubemap(Cubemap*, Point3, Color(*)(Texture*, Point2)); /* util */ -double fmin(double, double); -double fmax(double, double); Point2 modulapt2(Point2, Point2); Point3 modulapt3(Point3, Point3); Memimage *rgb(ulong); |