Update wasm implementation

This commit is contained in:
ayazhafiz 2022-04-07 21:10:22 -04:00
parent 4029748bdf
commit 134a7bf787
2 changed files with 29 additions and 34 deletions

View file

@ -92,8 +92,8 @@ pub fn exportAtan(comptime T: type, comptime name: []const u8) void {
pub fn exportRound(comptime T: type, comptime name: []const u8) void {
comptime var f = struct {
fn func(input: T) callconv(.C) i64 {
return @floatToInt(i64, (@round(input)));
fn func(input: T) callconv(.C) T {
return @round(input);
}
}.func;
@export(f, .{ .name = name ++ @typeName(T), .linkage = .Strong });