plastimatch
Loading...
Searching...
No Matches
src
base
Macros
clamp.h File Reference
Go to the source code of this file.
Macros
#
define
CLAMP
(
value
,
min_value
,
max_value
)
#
define
CLAMP2
(
v1
,
v2
,
min_value
,
max_value
)
Macro Definition Documentation
◆
CLAMP
#
define
CLAMP
(
value
,
min_value
,
max_value
)
Value:
do
{
\
if
(
value
<
min_value
) { \
value
=
min_value
; \
}
else
if
(
value
>
max_value
) { \
value
=
max_value
; \
} \
}
while
(0)
Point
Definition
pointset.h:15
◆
CLAMP2
#
define
CLAMP2
(
v1
,
v2
,
min_value
,
max_value
)
Value:
do
{
\
if
(
v1
<
min_value
) { \
v1
=
min_value
; \
}
\
if
(
v2
>
max_value
) { \
v2
=
max_value
; \
}
\
if
(
v2
<
v1
) { \
v2
=
v1
; \
} \
}
while
(0)
Generated on Thu Apr 11 2024 17:38:24 for plastimatch by
1.9.8