mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-20 11:47:46 +00:00
Add fill argument for MDL::pad_slice
This commit is contained in:
parent
280ba9b292
commit
18bb4ac54c
1 changed files with 2 additions and 2 deletions
|
@ -719,8 +719,8 @@ impl MDL {
|
|||
cursor.write_le::<[f32; 4]>(vec)
|
||||
}
|
||||
|
||||
fn pad_slice<const N: usize>(small_slice: &[f32; N]) -> [f32; 4] {
|
||||
let mut bigger_slice: [f32; 4] = [0.0, 0.0, 0.0, 0.0];
|
||||
fn pad_slice<const N: usize>(small_slice: &[f32; N], fill: f32) -> [f32; 4] {
|
||||
let mut bigger_slice: [f32; 4] = [fill, fill, fill, fill];
|
||||
bigger_slice[..N].copy_from_slice(&small_slice[..N]);
|
||||
bigger_slice
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue