func Begin () { TotalTraces = 1; } func OnLineHeader () { output(LH); } func OnTrace () { a = Tr.RecInd; b = Tr.SrcLoc/10; sx = Tr.SrPtXC; sy = Tr.SrPtYC; rx = Tr.RcPtXC; ry = Tr.RcPtYC; if(a != 0) { offset = sqrt((rx-sx)*(rx-sx)+(ry-sy)*(ry-sy)); if (b > a ) soffset = -1.0 * offset; if (b < a ) soffset = 1.0 * offset; Tr.DstSgn = soffset; Tr.DstUsg = offset; } output(Tr); } func End () { }