mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
Use negated isitmain to be sure the selection is done the same way (float comparison). More pid_t
This commit is contained in:
parent
61b016c72f
commit
bfe2475b51
2 changed files with 13 additions and 12 deletions
|
@ -22,7 +22,7 @@ int main(int argc, char *argv[]) {
|
|||
PARTADJ *adjs;
|
||||
float *vols;
|
||||
float predict, xmin,xmax,ymin,ymax,zmin,zmax;
|
||||
int *orig;
|
||||
pid_t *orig;
|
||||
|
||||
int isitinbuf;
|
||||
char isitinmain, d;
|
||||
|
@ -183,15 +183,16 @@ int main(int argc, char *argv[]) {
|
|||
nvpbuf = nvp;
|
||||
for (i=0; i<np; i++) {
|
||||
isitinbuf = 1;
|
||||
isitinmain = 1;
|
||||
|
||||
DL {
|
||||
rtemp[d] = r[i][d] - c[d];
|
||||
if (rtemp[d] > 0.5) rtemp[d] --;
|
||||
if (rtemp[d] < -0.5) rtemp[d] ++;
|
||||
isitinbuf = isitinbuf && (fabs(rtemp[d])<totwidth2);
|
||||
isitinmain = isitinmain && (fabs(rtemp[d]) <= width2);
|
||||
}
|
||||
if ((isitinbuf > 0) &&
|
||||
((fabs(rtemp[0])>width2)||(fabs(rtemp[1])>width2)||(fabs(rtemp[2])>width2))) {
|
||||
|
||||
if (isitinbuf && !isitinmain) {
|
||||
/*printf("%3.3f ",sqrt(rtemp[0]*rtemp[0] + rtemp[1]*rtemp[1] +
|
||||
rtemp[2]*rtemp[2]));
|
||||
printf("|%2.2f,%2.2f,%2.2f,%f,%f",r[i][0],r[i][1],r[i][2],width2,totwidth2);*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue