Skip to content

Commit e0c4c21

Browse files
authored
Merge branch 'main' into mixins
2 parents 356be4e + 8ef4227 commit e0c4c21

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ Zig game engine & graphics toolkit for building high-performance, truly cross-pl
1919

2020
Join the [Mach community on Discord](https://discord.gg/XNG3NZgCqp) to discuss this project, ask questions, get help, etc.
2121

22-
**We're here to make games and have fun, so please help keep the community focused on that.** No politics/heated topics are allowed. Unfortunately, the political landscape today makes it such that we must also state fascists can go f*k themselves. :) Anyone else is very welcome here.
23-
22+
**We're here to make games and have fun, so please help keep the community focused on that.** Do not escalate or engage in heated topics. LGBTQ+ people's existence is not political. Everyone is very welcome here. 💛

src/math/vec.zig

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,24 +162,23 @@ pub fn Vec(comptime Scalar: type, comptime length: usize) type {
162162
return .{ .v = a.v * Self.splat(s).v };
163163
}
164164

165-
/// Element-wise a < b
166-
pub inline fn less(a: *const Self, b: T) bool {
167-
return a.v < b.v;
165+
pub inline fn less(a: *const Self, b: *const Self) bool {
166+
return @reduce(.And, a.v < b.v);
168167
}
169168

170169
/// Element-wise a <= b
171-
pub inline fn lessEq(a: *const Self, b: T) bool {
172-
return a.v <= b.v;
170+
pub inline fn lessEq(a: *const Self, b: *const Self) bool {
171+
return @reduce(.And, a.v <= b.v);
173172
}
174173

175174
/// Element-wise a > b
176-
pub inline fn greater(a: *const Self, b: T) bool {
177-
return a.v > b.v;
175+
pub inline fn greater(a: *const Self, b: *const Self) bool {
176+
return @reduce(.And, a.v > b.v);
178177
}
179178

180179
/// Element-wise a >= b
181-
pub inline fn greaterEq(a: *const Self, b: T) bool {
182-
return a.v >= b.v;
180+
pub inline fn greaterEq(a: *const Self, b: *const Self) bool {
181+
return @reduce(.And, a.v >= b.v);
183182
}
184183

185184
/// Returns a vector with all components set to the `scalar` value:

0 commit comments

Comments
 (0)