#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;
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);
-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
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
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