convertType in math3d