Rotherham were relegated to League Two after going down to a 3-0 defeat to Wigan, who took a step closer to securing their League One status for next season.