Remove castToNat

This commit is contained in:
Joshua Hoeflich 2021-08-19 16:04:20 -05:00
parent 0bebb64bae
commit b57ebb6229
8 changed files with 2 additions and 22 deletions

View file

@ -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");
}

View file

@ -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)));
}