DeMar DeRozan and Rudy Gay score 21 points apiece and the Raptors end a five-game skid with a win over the Pistons on Friday night.