MCPcopy
hub / github.com/microsoft/SandDance / toString

Method toString

docs/app/js/sanddance-app.js:71263–71274  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71261var _common = require("../../lib/common");
71262class Matrix extends (0, _mathArrayDefault.default) {
71263 toString() {
71264 let string = "[";
71265 if ((0, _common.config).printRowMajor) {
71266 string += "row-major:";
71267 for(let row = 0; row < this.RANK; ++row)for(let col = 0; col < this.RANK; ++col)string += " ".concat(this[col * this.RANK + row]);
71268 } else {
71269 string += "column-major:";
71270 for(let i = 0; i < this.ELEMENTS; ++i)string += " ".concat(this[i]);
71271 }
71272 string += "]";
71273 return string;
71274 }
71275 getElementIndex(row, col) {
71276 return col * this.RANK + row;
71277 }

Callers 15

valueToStringFunction · 0.45
getRowsFunction · 0.45
constructorMethod · 0.45
getTextFunction · 0.45
shortFunction · 0.45
DataScopeButtonFunction · 0.45
GetDataAndColumnsFunction · 0.45
FileGetDataAndColumnsFunction · 0.45
hexFunction · 0.45
valueToStringFunction · 0.45
createElementFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected