Square rotation calculation software