func (vec *T) Slice() []float32 {
	return vec[:]
}
Slice returns the elements of the vector as slice.
package vec2
import (
	"fmt"
	math "github.com/ungerik/go3d/fmath"
	"github.com/ungerik/go3d/generic"
)
var (
	Zero = T{}
	UnitX = T{1, 0}
	UnitY = T{0, 1}
	UnitXY = T{1, 1}
	MinVal = T{-math.MaxFloat32, -math.MaxFloat32}
	MaxVal = T{+math.MaxFloat32, +math.MaxFloat32}
)
type T [2]float32
func From(other generic.T) T {
	return T{other.Get(0, 0), other.Get(0, 1)}
}
func Parse(s string) (r T, err error) {
	_, err = fmt.Sscan(s, &r[0], &r[1])
	return r, err
}
func (vec *T) String() string {
	return fmt.Sprint(vec[0], vec[1])
}
func (vec *T) Rows() int {
	return 2
}
func (vec *T) Cols() int {
	return 1
}
func (vec *T) Size() int {
	return 2
}