File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -322,23 +322,23 @@ pub fn VecShared(comptime Scalar: type, comptime VecN: type) type {
322322 }
323323
324324 /// Element-wise a < b
325- pub inline fn less (a : * const VecN , b : Scalar ) bool {
326- return a .v < b .v ;
325+ pub inline fn less (a : * const VecN , b : * const VecN ) bool {
326+ return @reduce ( .And , a .v < b .v ) ;
327327 }
328328
329329 /// Element-wise a <= b
330- pub inline fn lessEq (a : * const VecN , b : Scalar ) bool {
331- return a .v <= b .v ;
330+ pub inline fn lessEq (a : * const VecN , b : * const VecN ) bool {
331+ return @reduce ( .And , a .v <= b .v ) ;
332332 }
333333
334334 /// Element-wise a > b
335- pub inline fn greater (a : * const VecN , b : Scalar ) bool {
336- return a .v > b .v ;
335+ pub inline fn greater (a : * const VecN , b : * const VecN ) bool {
336+ return @reduce ( .And , a .v > b .v ) ;
337337 }
338338
339339 /// Element-wise a >= b
340- pub inline fn greaterEq (a : * const VecN , b : Scalar ) bool {
341- return a .v >= b .v ;
340+ pub inline fn greaterEq (a : * const VecN , b : * const VecN ) bool {
341+ return @reduce ( .And , a .v >= b .v ) ;
342342 }
343343
344344 /// Returns a vector with all components set to the `scalar` value:
You can’t perform that action at this time.
0 commit comments