xref: /original-bsd/lib/libplot/t4013/scale.c (revision 2301fdfb)
1 /*
2  * Copyright (c) 1980 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  */
6 
7 #ifndef lint
8 static char sccsid[] = "@(#)scale.c	5.1 (Berkeley) 06/07/85";
9 #endif not lint
10 
11 extern float scalex;
12 extern float scaley;
13 extern int scaleflag;
14 scale(i,x,y)
15 char i;
16 float x,y;
17 {
18 	switch(i) {
19 	default:
20 		return;
21 	case 'c':
22 		x *= 2.54;
23 		y *= 2.54;
24 	case 'i':
25 		x /= 200;
26 		y /= 200;
27 	case 'u':
28 		scalex = 1/x;
29 		scaley = 1/y;
30 	}
31 	scaleflag = 1;
32 }
33