xref: /csrg-svn/lib/libplot/vt0/subr.c (revision 48526)
1*48526Sbostic /*-
2*48526Sbostic  * Copyright (c) 1983 The Regents of the University of California.
3*48526Sbostic  * All rights reserved.
4*48526Sbostic  *
5*48526Sbostic  * %sccs.include.proprietary.c%
6*48526Sbostic  */
7*48526Sbostic 
813391Ssam #ifndef lint
9*48526Sbostic static char sccsid[] = "@(#)subr.c	4.2 (Berkeley) 04/22/91";
10*48526Sbostic #endif /* not lint */
1113391Ssam 
1213391Ssam extern float obotx;
1313391Ssam extern float oboty;
1413391Ssam extern float boty;
1513391Ssam extern float botx;
1613391Ssam extern float scalex;
1713391Ssam extern float scaley;
1813391Ssam xsc(xi){
1913391Ssam 	int xa;
2013391Ssam 	xa = (xi-obotx)*scalex+botx;
2113391Ssam 	return(xa);
2213391Ssam }
2313391Ssam ysc(yi){
2413391Ssam 	int ya;
2513391Ssam 	ya = (yi-oboty)*scaley+boty;
2613391Ssam 	return(ya);
2713391Ssam }
28