aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/gks/gschup.x
blob: d7698c419776428920bd813f1e9e5b3b3b8db0b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	<gset.h>

# GSCHUP -- Set character up vector.

procedure gschup (chux, chuy)

real	chux, chuy		# Character up vector, in world coordinates
int	char_up
bool	fp_equalr()

begin
	# Find the angle normal to the text baseline.  The angle is stored
	# in degrees between -180 and +180.

	if (fp_equalr (chux, 0.0))
	    char_up = 90
	else
	    char_up = nint (atan2 (chuy, chux) * 180. / 3.1415926)

	call gsawi (G_TXUP, char_up)
end