func (vec *T) Size() int {
	return 3
}
Size returns the number elements of the vector.
package vec3
import (
	"fmt"
	math "github.com/ungerik/go3d/fmath"
	"github.com/ungerik/go3d/generic"
)
var (
	Zero = T{}
	UnitX = T{1, 0, 0}
	UnitY = T{0, 1, 0}
	UnitZ = T{0, 0, 1}
	UnitXYZ = T{1, 1, 1}
	Red = T{1, 0, 0}
	Green = T{0, 1, 0}
	Blue = T{0, 0, 1}
	Black = T{0, 0, 0}
	White = T{1, 1, 1}
	MinVal = T{-math.MaxFloat32, -math.MaxFloat32, -math.MaxFloat32}
	MaxVal = T{+math.MaxFloat32, +math.MaxFloat32, +math.MaxFloat32}
)
type T [3]float32
func From(other generic.T) T {
	switch other.Size() {
	case 2:
		return T{other.Get(0, 0), other.Get(0, 1), 0}
	case 3, 4:
		return T{other.Get(0, 0), other.Get(0, 1), other.Get(0, 2)}
	default:
		panic("Unsupported type")
	}
}
func Parse(s string) (r T, err error) {
	_, err = fmt.Sscan(s, &r[0], &r[1], &r[2])
	return r, err
}
func (vec *T) String() string {
	return fmt.Sprint(vec[0], vec[1], vec[2])
}
func (vec *T) Rows() int {
	return 3
}
func (vec *T) Cols() int {
	return 1
}