Matrix2d md = Matrix2d::Identity() * 0.45; Matrix2f mf = Matrix2f::Identity(); cout << md + mf.cast() << endl;