update rotate.cpp