/* survey3debug.c routines to help debug the mat package. * (C) Copyright 1999 by John Halleck * All rights reserved. */ /* Version of August 16th, 1999 */ #include /* Standard IO */ #include "errors.h" /* Common error codes */ #include "survey3debug.h" /* And interfaces specific to this. */ /* --------------------- Printing ----------------------------------- */ /* Coordinates */ error coordprint (char *text, coordinate given) { if (text) printf ("%s\n", text); if (!given) return ERRnil; printf ("[ %f ]\n", given [0] ); printf ("[ %f ]\n", given [1] ); printf ("[ %f ]\n", given [2] ); return NoError; } /* Matrices */ error s33print (char *text, double given[]) { if (text) printf ("%s\n", text); if (!given) return ERRnil; printf ("[ %f %f %f ]\n", given[0], given[1], given[2]); printf ("[ %f %f %f ]\n", given[1], given[3], given[4]); printf ("[ %f %f %f ]\n", given[2], given[4], given[5]); return NoError; } error covarprint (char *text, covariance given) { return s33print (text, given); } error weightprint (char *text, weight given) { return s33print (text, given); }