maths: Provide MIN and MAX macros if not available

This commit is contained in:
Sebastian Krzyszkowiak 2022-07-18 02:56:43 +02:00
parent 4eb5903b11
commit 8e4dfa3884
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -23,6 +23,14 @@
#include "libsuperderpy.h"
#ifndef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
double DotProduct(const double v[], const double u[], int n);
double VectorLength(double x, double y, double z);
double Wrap(double left, double right, double val);