Skip to content

Commit

Permalink
And, not bitwise.
Browse files Browse the repository at this point in the history
Thanks to @eibanez. Closes tidyverse#661.
  • Loading branch information
hadley committed Nov 19, 2014
1 parent a4f7048 commit 991f539
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/between.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ LogicalVector between(NumericVector x, double left, double right) {
for (int i = 0; i < n; ++i) {
if (NumericVector::is_na(x[i])) {
out[i] = NA_REAL;
} else if ( (x[i] >= left) & (x[i] <= right) ) {
} else if ( (x[i] >= left) && (x[i] <= right) ) {
out[i] = true;
} else {
out[i] = false;
Expand Down

0 comments on commit 991f539

Please sign in to comment.