all: use mach.math instead of std.math; fixes hexops/mach#1021
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
7904b74145
commit
89622810f8
7 changed files with 42 additions and 41 deletions
|
|
@ -20,6 +20,9 @@ const assert = std.debug.assert;
|
|||
const Allocator = std.mem.Allocator;
|
||||
const testing = std.testing;
|
||||
|
||||
const mach = @import("../../main.zig");
|
||||
const math = mach.math;
|
||||
|
||||
const log = std.log.scoped(.atlas);
|
||||
|
||||
/// Data is the raw texture data.
|
||||
|
|
@ -145,7 +148,7 @@ pub fn reserve(self: *Atlas, alloc: Allocator, width: u32, height: u32) !Region
|
|||
|
||||
// Find the location in our nodes list to insert the new node for this region.
|
||||
const best_idx: usize = best_idx: {
|
||||
var best_height: u32 = std.math.maxInt(u32);
|
||||
var best_height: u32 = math.maxInt(u32);
|
||||
var best_width: u32 = best_height;
|
||||
var chosen: ?usize = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
const std = @import("std");
|
||||
const mach = @import("../main.zig");
|
||||
const math = mach.math;
|
||||
|
||||
/// Vertex writer manages the placement of vertices by tracking which are unique. If a duplicate vertex is added
|
||||
/// with `put`, only it's index will be written to the index buffer.
|
||||
|
|
@ -10,7 +12,7 @@ pub fn VertexWriter(comptime VertexType: type, comptime IndexType: type) type {
|
|||
next_sparse: IndexType = null_index,
|
||||
};
|
||||
|
||||
const null_index: IndexType = std.math.maxInt(IndexType);
|
||||
const null_index: IndexType = math.maxInt(IndexType);
|
||||
|
||||
vertices: []VertexType,
|
||||
indices: []IndexType,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue