aboutsummaryrefslogtreecommitdiff
path: root/src/pj_tsfn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pj_tsfn.c')
-rw-r--r--src/pj_tsfn.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pj_tsfn.c b/src/pj_tsfn.c
new file mode 100644
index 00000000..3c223e05
--- /dev/null
+++ b/src/pj_tsfn.c
@@ -0,0 +1,12 @@
+/* determine small t */
+#ifndef lint
+static const char SCCSID[]="@(#)pj_tsfn.c 4.3 93/06/12 GIE REL";
+#endif
+#include <math.h>
+#define HALFPI 1.5707963267948966
+ double
+pj_tsfn(double phi, double sinphi, double e) {
+ sinphi *= e;
+ return (tan (.5 * (HALFPI - phi)) /
+ pow((1. - sinphi) / (1. + sinphi), .5 * e));
+}