// From copies a T from a generic.T implementation. 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") } }