]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix the name of the trig function approximation in geopoly. No functional
authordrh <drh@noemail.net>
Thu, 29 Nov 2018 12:00:02 +0000 (12:00 +0000)
committerdrh <drh@noemail.net>
Thu, 29 Nov 2018 12:00:02 +0000 (12:00 +0000)
changes to the code.

FossilOrigin-Name: 33576b12b450a37b467ba012e77b297eb80d7147b12a5b23302009bb32455720

ext/rtree/geopoly.c
manifest
manifest.uuid

index 59b6b02bd22ef521cec4ca9f315cd2a49c29581f..f6a31f547b76f9d195820ada6c61026a40fe3553 100644 (file)
@@ -544,15 +544,15 @@ static void geopolyCcwFunc(
 
 #define GEOPOLY_PI 3.1415926535897932385
 
-/* Fast approximation for cosine(X) for X between -0.5*pi and 2*pi
+/* Fast approximation for sine(X) for X between -0.5*pi and 2*pi
 */
-static double geopolyCosine(double r){
+static double geopolySine(double r){
   assert( r>=-0.5*GEOPOLY_PI && r<=2.0*GEOPOLY_PI );
   if( r>=1.5*GEOPOLY_PI ){
     r -= 2.0*GEOPOLY_PI;
   }
   if( r>=0.5*GEOPOLY_PI ){
-    return -geopolyCosine(r-GEOPOLY_PI);
+    return -geopolySine(r-GEOPOLY_PI);
   }else{
     double r2 = r*r;
     double r3 = r2*r;
@@ -593,8 +593,8 @@ static void geopolyRegularFunc(
   p->hdr[3] = n&0xff;
   for(i=0; i<n; i++){
     double rAngle = 2.0*GEOPOLY_PI*i/n;
-    p->a[i*2] = x - r*geopolyCosine(rAngle-0.5*GEOPOLY_PI);
-    p->a[i*2+1] = y + r*geopolyCosine(rAngle);
+    p->a[i*2] = x - r*geopolySine(rAngle-0.5*GEOPOLY_PI);
+    p->a[i*2+1] = y + r*geopolySine(rAngle);
   }
   sqlite3_result_blob(context, p->hdr, 4+8*n, SQLITE_TRANSIENT);
   sqlite3_free(p);
index 62bffa84a1e655bd12a5fac1d6b89a8b20210d13..9280ee718d7ad331a8fe95d77b65f1193712b16c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\stypo\sin\sa\scomment\sused\sto\sgenerate\sdocumentation.\s\sNo\schanges\sto\scode.
-D 2018-11-28T19:23:28.493
+C Fix\sthe\sname\sof\sthe\strig\sfunction\sapproximation\sin\sgeopoly.\s\sNo\sfunctional\nchanges\sto\sthe\scode.
+D 2018-11-29T12:00:02.511
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F Makefile.in a050c8670ea0d7b37b2192306cbb50d392acd9902b84e9b56f3444d006f97a6c
@@ -361,7 +361,7 @@ F ext/repair/test/checkfreelist01.test 3e8aa6aeb4007680c94a8d07b41c339aa635cc782
 F ext/repair/test/checkindex01.test b530f141413b587c9eb78ff734de6bb79bc3515c335096108c12c01bddbadcec
 F ext/repair/test/test.tcl 686d76d888dffd021f64260abf29a55c57b2cedfa7fc69150b42b1d6119aac3c
 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
-F ext/rtree/geopoly.c 6683c99463cc1c53ec9d3a4631d9244505323cb8d8675fda94e8dcb161fc7e33
+F ext/rtree/geopoly.c d56ff997f2646b03be742eb85e8206f779d777f3a282fe0da576780ca0e11f20
 F ext/rtree/rtree.c 7125183bf6c37b8b8ee1a04d2b0fe258531fd31650fdd050ed041817f1943d17
 F ext/rtree/rtree.h 4a690463901cb5e6127cf05eb8e642f127012fd5003830dbc974eca5802d9412
 F ext/rtree/rtree1.test 309afc04d4287542b2cd74f933296832cc681c7b014d9405cb329b62053a5349
@@ -1779,7 +1779,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 8eb62fd5fa9adb88de51aa812270dbdb32ee5cacd636d200e658c507a14a035b
-R c8321b0424a8674cc113e6230d43138f
+P 62360ceae9d2321003c49cfac3e9f915969a0da12d02c3e633cfa898c0a68566
+R f7bc600ba0a16071eafe630bad99c9a2
 U drh
-Z 38ca87a492d23c8bfd3002681030faf1
+Z 3d70394fb420e5973a9d375ccb3cd3d5
index 336024caaaf2c34753c776c12c76e201190a8216..8664bd865ae03de84b62951c52d1211653101d45 100644 (file)
@@ -1 +1 @@
-62360ceae9d2321003c49cfac3e9f915969a0da12d02c3e633cfa898c0a68566
\ No newline at end of file
+33576b12b450a37b467ba012e77b297eb80d7147b12a5b23302009bb32455720
\ No newline at end of file