/* * Copyright (C) 1986, 1987, 1990 Thomas Williams, Colin Kelley * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the modified code. Modifications are to be distributed * as patches to released version. * * This software is provided "as is" without express or implied warranty. * * * AUTHORS * * Original Software: * Thomas Williams, Colin Kelley. * * Gnuplot 2.0 additions: * Russell Lang, Dave Kotz, John Campbell. * * send your comments or suggestions to (pixar!info-gnuplot@sun.com). * */ #define inrange(z, min, max) ( (min)<(max) ? (z) >= (min) && (z) <= (max) : (z) >= (max) && (z) <= (min) ) /* Functions to map from user to terminal coordinates */ #define map_x(x) ((int)(xleft+((x)-xmin)*xscale+0.5)) #define map_y(y) ((int)(ybot +((y)-ymin)*yscale+0.5))