mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
edges, resistance, snap: unified resistance and snapping engine
This commit is contained in:
parent
1b0f1a4c4e
commit
e7e6d29237
8 changed files with 748 additions and 469 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue