Re: CLAMP()
- From: jrb redhat com
- To: Davina Armstrong <davina lickey com>
- Cc: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: CLAMP()
- Date: 05 Mar 2001 19:16:04 -0500
Davina Armstrong <davina lickey com> writes:
What does CLAMP() do? I've grep'd the code, but I can't even figure out
where it's defined.
it's defined in glib.h
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
CLAMP (5, 0, 10) == 5
CLAMP (-100, 0, 10) == 0
CLAMP (100, 0, 10) == 10
-Jonathan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]