You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be convenient to include a format function in Vec and Mat structs (and other similar types) for easy printing of these types (std.debug.print, allocPrint, etc).
Default for Vec2 is:
math.vec.Vec(2,f32){ .v = { 1e0, 2e0 } }
A more compact Vec2 output:
[1.0 2.1]
or
1.0, 2.1
or
1.0 2.1
Mat2x2:
[[1.0, 0.0], [0.0, 1.0]]
or
[1.0 0.0] [0.0, 1.0]
It would be convenient to include a format function in Vec and Mat structs (and other similar types) for easy printing of these types (std.debug.print, allocPrint, etc).
Default for Vec2 is:
math.vec.Vec(2,f32){ .v = { 1e0, 2e0 } }
A more compact Vec2 output:
[1.0 2.1]
or
1.0, 2.1
or
1.0 2.1
Mat2x2:
[[1.0, 0.0], [0.0, 1.0]]
or
[1.0 0.0] [0.0, 1.0]
Or something along these lines.
https://ziglang.org/documentation/master/std/#std.fmt.Formatter
The text was updated successfully, but these errors were encountered: