math lib optimize

matrix rotate, matrix copy optimize