Skip to content

Commit

Permalink
kd_res_item3 and kd_res_item3f would always return 0 (fixing issue #10)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsiomb committed Jan 24, 2018
1 parent 073be8d commit 46a1e01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kdtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ void *kd_res_item3(struct kdres *rset, double *x, double *y, double *z)
if(*x) *x = rset->riter->item->pos[0];
if(*y) *y = rset->riter->item->pos[1];
if(*z) *z = rset->riter->item->pos[2];
return rset->riter->item->data;
}
return 0;
}
Expand All @@ -679,6 +680,7 @@ void *kd_res_item3f(struct kdres *rset, float *x, float *y, float *z)
if(*x) *x = rset->riter->item->pos[0];
if(*y) *y = rset->riter->item->pos[1];
if(*z) *z = rset->riter->item->pos[2];
return rset->riter->item->data;
}
return 0;
}
Expand Down

0 comments on commit 46a1e01

Please sign in to comment.