mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Merge trunk
This commit is contained in:
commit
7068da7144
7 changed files with 589 additions and 565 deletions
|
@ -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
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue