Use floor division operator in pendulate()