File: pj_qsfn.c

package info (click to toggle)
proj 4.8.0-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 25,780 kB
  • ctags: 2,042
  • sloc: sh: 355,854; ansic: 14,877; java: 316; makefile: 260; xml: 46
file content (16 lines) | stat: -rw-r--r-- 337 bytes parent folder | download | duplicates (22)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* determine small q */
#include <math.h>
#include <projects.h>

# define EPSILON 1.0e-7
	double
pj_qsfn(double sinphi, double e, double one_es) {
	double con;

	if (e >= EPSILON) {
		con = e * sinphi;
		return (one_es * (sinphi / (1. - con * con) -
		   (.5 / e) * log ((1. - con) / (1. + con))));
	} else
		return (sinphi + sinphi);
}