func (mat *T) Get(col, row int) float32 {
	return mat[col][row]
}
Get returns one element of the matrix.
package mat2
import (
	"fmt"
	"github.com/ungerik/go3d/generic"
	"github.com/ungerik/go3d/vec2"
)
var (
	Zero = T{}
	Ident = T{
		vec2.T{1, 0},
		vec2.T{0, 1},
	}
)
type T [2]vec2.T
func From(other generic.T) T {
	r := Ident
	cols := other.Cols()
	rows := other.Rows()
	if (cols == 3 && rows == 3) || (cols == 4 && rows == 4) {
		cols = 2
		rows = 2
	} else if !(cols == 2 && rows == 2) {
		panic("Unsupported type")
	}
	for col := 0; col < cols; col++ {
		for row := 0; row < rows; row++ {
			r[col][row] = other.Get(col, row)
		}
	}
	return r
}
func Parse(s string) (r T, err error) {
	_, err = fmt.Sscan(s,
		&r[0][0], &r[0][1],
		&r[1][0], &r[1][1],
	)
	return r, err
}
func (mat *T) String() string {
	return fmt.Sprintf("%s %s", mat[0].String(), mat[1].String())
}
func (mat *T) Rows() int {
	return 2
}
func (mat *T) Cols() int {
	return 2
}
func (mat *T) Size() int {
	return 4
}
func (mat *T) Slice() []float32 {
	return mat.Array()[:]
}