aboutsummaryrefslogtreecommitdiff
path: root/math/surfit/iszero.x
blob: d453d1fd33e1467a3c6205cfd79bad83e87e5824 (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
24
25
26
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include "surfitdef.h"

# ISZERO -- Procedure to zero the accumulators for line number lineno.

procedure iszero (sf)

pointer	sf	# pointer to the surface descriptor

begin
	SF_NXPTS(sf) = 0
	SF_NYPTS(sf) = 0

	call aclrr (XMATRIX(SF_XMATRIX(sf)),
		     SF_XORDER(sf) * SF_NXCOEFF(sf))
	call aclrr (YMATRIX(SF_YMATRIX(sf)),
		    SF_YORDER(sf) * SF_NYCOEFF(sf))
	call aclrr (XCOEFF(SF_XCOEFF(sf)), SF_NXCOEFF(sf) * SF_NLINES(sf))
	call aclrr (COEFF(SF_COEFF(sf)), SF_NXCOEFF(sf) * SF_NYCOEFF(sf))

	if (SF_WZ(sf) != NULL)
	    call mfree (SF_WZ(sf), MEM_TYPE)
	if (SF_TLEFT(sf) != NULL)
	    call mfree (SF_TLEFT(sf), TY_INT)
end