edges, resistance, snap: unified resistance and snapping engine

This commit is contained in:
Andrew J. Hesford 2024-01-23 13:44:40 -05:00
parent 1b0f1a4c4e
commit e7e6d29237
8 changed files with 748 additions and 469 deletions

View file

@ -2,6 +2,8 @@
#ifndef LABWC_MACROS_H
#define LABWC_MACROS_H
#include <limits.h>
/**
* ARRAY_SIZE() - Get the number of elements in array.
* @arr: array to be sized
@ -50,4 +52,13 @@
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
/**
* BOUNDED_INT() - Returns true if an integer is not INT_MAX or INT_MIN
*
* @param val Value to test (integer)
*/
#ifndef BOUNDED_INT
#define BOUNDED_INT(a) ((a) < INT_MAX && (a) > INT_MIN)
#endif
#endif /* LABWC_MACROS_H */