Initial snark14m import
[snark14.git] / src / snark / getang.cpp
1 /*
2  ***********************************************************
3  $SNARK_Header: S N A R K  1 4 - A PICTURE RECONSTRUCTION PROGRAM $
4  $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/getang.cpp $
5  $LastChangedRevision: 80 $
6  $Date: 2014-07-01 21:01:54 -0400 (Tue, 01 Jul 2014) $
7  $Author: agulati $
8  ***********************************************************
9  
10  RETURN VALUES OF THETA, SINTH AND COSTH FOR PROJECTION NP.
11  */
12
13 #include <cstdio>
14 #include <cstdlib>
15 #include <cmath>
16
17 #include "blkdta.h"
18 #include "geom.h"
19 #include "uiod.h"
20
21 #include "anglst.h"
22
23 void anglst_class::getang(INTEGER np, REAL* theta, REAL* sinth, REAL* costh)
24 {
25         if ((np >= 0) && (np < GeoPar.prjnum))
26         {
27                 *theta = bth[np];
28                 *sinth = bsin[np];
29                 *costh = bcos[np];
30                 return;
31         }
32         // NP IS OUT OF RANGE
33         fprintf(output,
34                         "\n **** getang called with invalid projection number: np = %5i",
35                         np);
36         fprintf(output, "\n **** program aborted\n");
37         exit(-1);
38 }