From 2c410b56f801708ec11a1af6cdd995d69e9db059 Mon Sep 17 00:00:00 2001 From: rodri Date: Tue, 27 Aug 2024 12:05:08 +0000 Subject: replace f?(min|max) functions with type-agnostic macros. this simplifies the code and serves as another shadeop to use on application shaders. --- graphics.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graphics.h') diff --git a/graphics.h b/graphics.h index 61f4bf4..96b3159 100644 --- a/graphics.h +++ b/graphics.h @@ -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); -- cgit v1.2.3