ona/src/math.zig
kayomn 9ae6e8b4a7
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Implement first pass of Oar archive reading mechanism
2022-10-09 23:10:13 +01:00

7 lines
221 B
Zig

///
/// Rounds the `Number` `value` up to the nearest `multiple`.
///
pub fn roundUp(comptime Number: type, value: Number, multiple: Number) Number {
return value + @mod(@mod(multiple - value, multiple), multiple);
}