Merge trunk

This commit is contained in:
Joshua Hoeflich 2021-08-17 08:47:40 -05:00
commit 7068da7144
7 changed files with 589 additions and 565 deletions

View file

@ -81,6 +81,7 @@ comptime {
exportNumFn(num.asin, "asin");
exportNumFn(num.bytesToU16C, "bytes_to_u16");
exportNumFn(num.bytesToU32C, "bytes_to_u32");
exportNumFn(num.round, "round");
}
// Str Module

View file

@ -44,3 +44,7 @@ fn bytesToU32(arg: RocList, position: usize) u32 {
const exampleAnswer: u32 = 41;
return 41;
}
pub fn round(num: f64) callconv(.C) i64 {
return @floatToInt(i32, (@round(num)));
}