mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
os: add header for math related functions (possibly OS optimized)
Adding a new header for math related functions, beginning with new MIN/MAX macros, which will be used by subsequent commits. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
33729b1361
commit
e0ddc62bd0
@@ -122,7 +122,7 @@ typedef int XRetCode;
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
/* @deprecated */
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
/* abs() is a function, not a macro; include the file declaring
|
||||
|
||||
16
os/mathx_priv.h
Normal file
16
os/mathx_priv.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/* SPDX-License-Identifier: MIT OR X11
|
||||
*
|
||||
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||
*/
|
||||
#ifndef _XSERVER_OS_MATHX_PRIV_H_
|
||||
#define _XSERVER_OS_MATHX_PRIV_H_
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
#endif /* _XSERVER_OS_MATHX_PRIV_H_ */
|
||||
Reference in New Issue
Block a user