Skip to content

Instantly share code, notes, and snippets.

View fospathi's full-sized avatar

Christian Stewart fospathi

View GitHub Profile
/// Print the calculation which multiplies two 4x4 matrices.
///
/// The matrices store their elements in a flat array in column order.
void main() {
StringBuffer buffer = new StringBuffer();
String l = "m1";
String r = "m2";
for (int col in new Iterable.generate(4)) {
for (int row in new Iterable.generate(4)) {
buffer.writeAll([
/// Print the calculation which multiplies two 3x3 matrices.
///
/// The matrices store their elements in a flat array in column order.
void main() {
StringBuffer buffer = new StringBuffer();
String l = "m1";
String r = "m2";
for (int col in new Iterable.generate(3)) {
for (int row in new Iterable.generate(3)) {
buffer.writeAll([