mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Remove castToNat
This commit is contained in:
parent
0bebb64bae
commit
b57ebb6229
8 changed files with 2 additions and 22 deletions
|
@ -81,7 +81,6 @@ comptime {
|
|||
exportNumFn(num.asin, "asin");
|
||||
exportNumFn(num.bytesToU16C, "bytes_to_u16");
|
||||
exportNumFn(num.bytesToU32C, "bytes_to_u32");
|
||||
exportNumFn(num.castToNat, "cast_to_nat");
|
||||
exportNumFn(num.round, "round");
|
||||
}
|
||||
|
||||
|
|
|
@ -41,10 +41,6 @@ fn bytesToU32(arg: RocList, position: usize) u32 {
|
|||
return @bitCast(u32, [_]u8{ bytes[position], bytes[position + 1], bytes[position + 2], bytes[position + 3] });
|
||||
}
|
||||
|
||||
pub fn castToNat(num: i64) callconv(.C) usize {
|
||||
return @intCast(usize, num);
|
||||
}
|
||||
|
||||
pub fn round(num: f64) callconv(.C) i64 {
|
||||
return @floatToInt(i32, (@round(num)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue