aboutsummaryrefslogtreecommitdiff
path: root/core/fmt
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-10-19 11:24:26 +0100
committergingerBill <bill@gingerbill.org>2021-10-19 11:24:26 +0100
commit243e2e2b8a7566087375178a66b25b5d9ac9a356 (patch)
treed82f6499edb8a1056c19479c59e6390f294887e7 /core/fmt
parent35111b39b88bb12d61e1dc67ed0161109be3f865 (diff)
Basic support for matrix*vector, vector*matrix operations
Diffstat (limited to 'core/fmt')
-rw-r--r--core/fmt/fmt.odin16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin
index 804a29cab..46b1fc14c 100644
--- a/core/fmt/fmt.odin
+++ b/core/fmt/fmt.odin
@@ -1960,13 +1960,13 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
fi.indent += 1; defer fi.indent -= 1
- if fi.hash {
+ if fi.hash {
io.write_byte(fi.writer, '\n')
// TODO(bill): Should this render it like in written form? e.g. tranposed
- for col in 0..<info.column_count {
+ for row in 0..<info.row_count {
fmt_write_indent(fi)
- for row in 0..<info.row_count {
- if row > 0 { io.write_string(fi.writer, ", ") }
+ for col in 0..<info.column_count {
+ if col > 0 { io.write_string(fi.writer, ", ") }
offset := row*info.elem_size + col*info.stride
@@ -1976,10 +1976,10 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
io.write_string(fi.writer, ";\n")
}
} else {
- for col in 0..<info.column_count {
- if col > 0 { io.write_string(fi.writer, "; ") }
- for row in 0..<info.row_count {
- if row > 0 { io.write_string(fi.writer, ", ") }
+ for row in 0..<info.row_count {
+ if row > 0 { io.write_string(fi.writer, ", ") }
+ for col in 0..<info.column_count {
+ if col > 0 { io.write_string(fi.writer, "; ") }
offset := row*info.elem_size + col*info.stride