Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac23cba

Browse files
committed
limit threshold using PI
1 parent6ab0ff8 commitac23cba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎crossmatch.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
#defineheap_formtuple heap_form_tuple
4848
#endif
4949

50+
#ifndefM_PI
51+
#defineM_PI 3.14159265358979323846
52+
#endif
53+
5054
/*
5155
* Pair of pages for pending scan.
5256
*/
@@ -146,7 +150,7 @@ setupFirstcall(CrossmatchContext *ctx, Oid idx1, Oid idx2,
146150
ctx->indexes[0]=index_open(idx1,AccessShareLock);
147151
ctx->indexes[1]=index_open(idx2,AccessShareLock);
148152

149-
ctx->pointThreshold=2.0*sin(0.5*threshold);
153+
ctx->pointThreshold=2.0*sin(0.5*(threshold>M_PI ?M_PI :threshold));
150154
ctx->box3dThreshold=MAXCVALUE*ctx->pointThreshold;
151155

152156
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp