diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
commit | 02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch) | |
tree | f053238978479e408a2b83571443e132f30586ab /src/cmd/map/libmap | |
parent | c0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff) | |
parent | 3d1382b98a502d0c34d5ba2c462396acc515016e (diff) | |
download | plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2 plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/map/libmap')
-rw-r--r-- | src/cmd/map/libmap/bonne.c | 2 | ||||
-rw-r--r-- | src/cmd/map/libmap/cubrt.c | 2 | ||||
-rw-r--r-- | src/cmd/map/libmap/elco2.c | 2 | ||||
-rw-r--r-- | src/cmd/map/libmap/gilbert.c | 2 | ||||
-rw-r--r-- | src/cmd/map/libmap/homing.c | 2 | ||||
-rw-r--r-- | src/cmd/map/libmap/lambert.c | 2 | ||||
-rw-r--r-- | src/cmd/map/libmap/lune.c | 2 | ||||
-rw-r--r-- | src/cmd/map/libmap/tetra.c | 7 | ||||
-rw-r--r-- | src/cmd/map/libmap/twocirc.c | 6 |
9 files changed, 12 insertions, 15 deletions
diff --git a/src/cmd/map/libmap/bonne.c b/src/cmd/map/libmap/bonne.c index 858f0d69..1c9db868 100644 --- a/src/cmd/map/libmap/bonne.c +++ b/src/cmd/map/libmap/bonne.c @@ -15,7 +15,7 @@ Xbonne(struct place *place, double *x, double *y) alpha = place->wlon.l; else if(fabs(place->nlat.c)==0) alpha = 0; - else + else alpha = place->wlon.l/(1+ stdpar.c*stdpar.c*stdpar.c/place->nlat.c/3); else diff --git a/src/cmd/map/libmap/cubrt.c b/src/cmd/map/libmap/cubrt.c index fd508d2b..abfd6ea0 100644 --- a/src/cmd/map/libmap/cubrt.c +++ b/src/cmd/map/libmap/cubrt.c @@ -6,7 +6,7 @@ double cubrt(double a) { double x,y,x1; - if(a==0) + if(a==0) return(0.); y = 1; if(a<0) { diff --git a/src/cmd/map/libmap/elco2.c b/src/cmd/map/libmap/elco2.c index b4c9bbf6..6f7d5604 100644 --- a/src/cmd/map/libmap/elco2.c +++ b/src/cmd/map/libmap/elco2.c @@ -76,7 +76,7 @@ elco2(double x, double y, double kc, double a, double b, double *u, double *v) cmul(c,dn2,1+e1*m2,e2*m2,&f1,&f2); cdiv(d*x,d*y,f1,f2,&d1[i],&d2[i]); - if(k<=CC) + if(k<=CC) break; kc = sqrt(m*kc); f = m2; diff --git a/src/cmd/map/libmap/gilbert.c b/src/cmd/map/libmap/gilbert.c index 173ffcd3..f7ee7b6f 100644 --- a/src/cmd/map/libmap/gilbert.c +++ b/src/cmd/map/libmap/gilbert.c @@ -47,5 +47,3 @@ gilbert(void) use standard formula: tan x/2 = (1-cos x)/sin x = sin x/(1+cos x) to show that the right side of the last equation is tan(n/2) */ - - diff --git a/src/cmd/map/libmap/homing.c b/src/cmd/map/libmap/homing.c index 366f69fe..9678c681 100644 --- a/src/cmd/map/libmap/homing.c +++ b/src/cmd/map/libmap/homing.c @@ -94,7 +94,7 @@ hlimb(double *lat, double *lon, double res) return 0; } *lat += res; - if(*lat <= 90) + if(*lat <= 90) return 1; if(*lon == 90) return -1; diff --git a/src/cmd/map/libmap/lambert.c b/src/cmd/map/libmap/lambert.c index 6b688aa3..e8037a6c 100644 --- a/src/cmd/map/libmap/lambert.c +++ b/src/cmd/map/libmap/lambert.c @@ -34,7 +34,7 @@ lambert(double par0, double par1) } deg2rad(par0, &stdp0); deg2rad(par1, &stdp1); - if(fabs(par1+par0)<.1) + if(fabs(par1+par0)<.1) return(mercator()); if(fabs(par1-par0)<.1) return(perspective(-1.)); diff --git a/src/cmd/map/libmap/lune.c b/src/cmd/map/libmap/lune.c index dc58c6f0..a3d06d81 100644 --- a/src/cmd/map/libmap/lune.c +++ b/src/cmd/map/libmap/lune.c @@ -42,7 +42,7 @@ static int Xlune(struct place *place, double *x, double *y) deny = w1y + w2y; cdiv(numx, numy, denx, deny, x, y); return 1; -} +} proj lune(double lat, double theta) diff --git a/src/cmd/map/libmap/tetra.c b/src/cmd/map/libmap/tetra.c index 6bdef49b..31837de2 100644 --- a/src/cmd/map/libmap/tetra.c +++ b/src/cmd/map/libmap/tetra.c @@ -66,7 +66,7 @@ static struct tproj { {/*30*/ {0., -45., 45., -150.}, /*31*/ {0., -135., 135., -30.}, /*32*/ {-90., 0., 0., 90.}, - /*33*/ {0.} + /*33*/ {0.} }}; static double tx[4] = { /*where to move facet after final rotation*/ 0., 0., -1., 1. /*-1,1 to be sqrt(3)*/ @@ -136,7 +136,7 @@ Xtetra(struct place *place, double *x, double *y) return 0; vr = fpir - vr; vi = fpii - vi; - } else + } else if(!elco2(br,bi,tk,1.,1.,&vr,&vi)) return 0; if(si>=0) { @@ -158,7 +158,7 @@ int tetracut(struct place *g, struct place *og, double *cutlon) { int i,j,k; - if((g->nlat.s<=-rt3inv&&og->nlat.s<=-rt3inv) && + if((g->nlat.s<=-rt3inv&&og->nlat.s<=-rt3inv) && (ckcut(g,og,*cutlon=0.)==2||ckcut(g,og,*cutlon=PI)==2)) return(2); twhichp(g,&i,&k); @@ -203,4 +203,3 @@ tetra(void) } return(Xtetra); } - diff --git a/src/cmd/map/libmap/twocirc.c b/src/cmd/map/libmap/twocirc.c index 0d0e48a4..9c7b7ec4 100644 --- a/src/cmd/map/libmap/twocirc.c +++ b/src/cmd/map/libmap/twocirc.c @@ -44,7 +44,7 @@ twocircles(double m, double p, double p1, double p2, double *x, double *y) *y = (*x*a+t/2)/b; } return 1; -} +} static int Xglobular(struct place *place, double *x, double *y) @@ -52,7 +52,7 @@ Xglobular(struct place *place, double *x, double *y) twocircles(-2*place->wlon.l/PI, 2*place->nlat.l/PI, place->nlat.c, place->nlat.s, x, y); return 1; -} +} proj globular(void) @@ -68,7 +68,7 @@ Xvandergrinten(struct place *place, double *x, double *y) double pval = abst>=1? 1: abst/(1+sqrt(1-t*t)); double p2 = 2*pval/(1+pval); twocircles(-place->wlon.l/PI, pval, sqrt(1-p2*p2), p2, x, y); - if(t < 0) + if(t < 0) *y = -*y; return 1; } |