Skip to content

Commit 4a5a476

Browse files
committed
Fix Float Printing Format
1 parent 52836ef commit 4a5a476

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/call_zig_from_js/main.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fn my_function_string(e: *webui.Event) void {
6565
}
6666

6767
fn getInteger(n1: i64, n2: i64, n3: i64, f1: f64) void {
68-
std.debug.print("number is {},{},{},{}\n", .{
68+
std.debug.print("number is {},{},{},{d}\n", .{
6969
n1, n2, n3, f1,
7070
});
7171
}
@@ -92,7 +92,7 @@ fn my_function_integer(e: *webui.Event) void {
9292

9393
const float_1 = e.getFloatAt(3);
9494
// 12345.6789
95-
std.debug.print("my_function_integer 4: {}\n", .{float_1});
95+
std.debug.print("my_function_integer 4: {d}\n", .{float_1});
9696
}
9797

9898
fn getBool(b1: bool, b2: bool) void {

0 commit comments

Comments
 (0)