Skip to content

Commit

Permalink
change it again
Browse files Browse the repository at this point in the history
  • Loading branch information
OneAvargeCoder193 committed Jan 26, 2025
1 parent 60f2e6b commit 271ffce
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/game.zig
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,8 @@ pub const collision = struct {
continue;
}

var min = @max(vec.xy(blockBox.min), vec.xy(boundingBox.min));
var max = @min(vec.xy(blockBox.max), vec.xy(boundingBox.max));
const tmp = min;
min = @min(min, max);
max = @max(max, tmp);
const max = @min(vec.xy(blockBox.max), vec.xy(boundingBox.max));
const min = std.math.clamp(vec.xy(blockBox.min), max, vec.xy(boundingBox.min));

const area = (max[0] - min[0]) * (max[1] - min[1]);

Expand Down

0 comments on commit 271ffce

Please sign in to comment.