diff --git a/Code/Dqn.h b/Code/Dqn.h index 8e1147e..38b3561 100644 --- a/Code/Dqn.h +++ b/Code/Dqn.h @@ -989,7 +989,7 @@ DQN_HEADER_COPY_PROTOTYPE(template inline Dqn_Slice, Dqn_Slice_C { Dqn_Slice result = {}; result.len = len; - result.buf = DQN_CAST(T *)Dqn_Allocator_Allocate(arena, (sizeof(T) * len) + 1, alignof(T)); + result.buf = DQN_CAST(T *)Dqn_Allocator_Allocate(allocator, (sizeof(T) * len) + 1, alignof(T)); memcpy(result.buf, src, len * sizeof(T)); result.buf[len] = 0; return result; @@ -997,7 +997,7 @@ DQN_HEADER_COPY_PROTOTYPE(template inline Dqn_Slice, Dqn_Slice_C DQN_HEADER_COPY_PROTOTYPE(template inline Dqn_Slice, Dqn_Slice_CopyNullTerminated(Dqn_Allocator *allocator, Dqn_Slice const src)) { - Dqn_Slice result = Dqn_Slice_CopyNullTerminated(arena, src.buf, src.len); + Dqn_Slice result = Dqn_Slice_CopyNullTerminated(allocator, src.buf, src.len); return result; } @@ -1005,7 +1005,7 @@ DQN_HEADER_COPY_PROTOTYPE(template inline Dqn_Slice, Dqn_Slice_C { Dqn_Slice result = {}; result.len = len; - result.buf = DQN_CAST(T *)Dqn_Allocator_Allocate(arena, sizeof(T) * len, alignof(T)); + result.buf = DQN_CAST(T *)Dqn_Allocator_Allocate(allocator, sizeof(T) * len, alignof(T)); memcpy(result.buf, src, len * sizeof(T)); return result; } @@ -2036,6 +2036,12 @@ DQN_HEADER_COPY_PROTOTYPE(Dqn_V2, Dqn_LerpV2(Dqn_V2 a, Dqn_f32 t, Dqn_V2 b)) return result; } +DQN_HEADER_COPY_PROTOTYPE(f32, Dqn_LerpF32(f32 a, f32 t, f32 b)) +{ + f32 result = a + ((b - a) * t); + return result; +} + // @ ------------------------------------------------------------------------------------------------- // @ // @ NOTE: Dqn_Mat4