func (mat *T) Size() int {
	return 9
}
Size returns the number elements of the matrix.
package mat3
import (
	"fmt"
	"math"
	"github.com/ungerik/go3d/float64/generic"
	"github.com/ungerik/go3d/float64/mat2"
	"github.com/ungerik/go3d/float64/quaternion"
	"github.com/ungerik/go3d/float64/vec2"
	"github.com/ungerik/go3d/float64/vec3"
)
var (
	Zero = T{}
	Ident = T{
		vec3.T{1, 0, 0},
		vec3.T{0, 1, 0},
		vec3.T{0, 0, 1},
	}
)
type T [3]vec3.T
func From(other generic.T) T {
	r := Ident
	cols := other.Cols()
	rows := other.Rows()
	if cols == 4 && rows == 4 {
		cols = 3
		rows = 3
	} else if !((cols == 2 && rows == 2) || (cols == 3 && rows == 3)) {
		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[0][2],
		&r[1][0], &r[1][1], &r[1][2],
		&r[2][0], &r[2][1], &r[2][2],
	)
	return r, err
}
func (mat *T) String() string {
	return fmt.Sprintf("%s %s %s", mat[0].String(), mat[1].String(), mat[2].String())
}
func (mat *T) Rows() int {
	return 3
}
func (mat *T) Cols() int {
	return 3
}