Skip to content

Commit 01f73c2

Browse files
James BarbettiJames Barbetti
James Barbetti
authored and
James Barbetti
committed
Changed the select() implementation in fakevector.h.
select (x,y,z) now takes y where x!=0. Formerly it only took y where x was == -1.
1 parent 81e8e40 commit 01f73c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

example/fakevector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ template <class T, int s>
5353
}
5454

5555
template <class T, int s, class B>
56-
FakeVector<T,s> select ( const FakeVector<B,s>& isLess,
56+
FakeVector<T,s> select ( const FakeVector<B,s>& isLeft,
5757
const FakeVector<T,s>& left,
5858
const FakeVector<T,s>& right ) {
5959
FakeVector<T,s> result;
6060
for (int i=0; i<s; ++i) {
61-
result.data[i] = (isLess.data[i]==-1)
61+
result.data[i] = (isLeft.data[i]!=0)
6262
? left.data[i] : right.data[i];
6363
}
6464
return result;

0 commit comments

Comments
 (0)