The Toronto Raptors and Indiana Pacer have agreed upon a sign-and-trade of C.J. Miles for Cory Joseph.

Miles, who is a free agent this offseason, will sign a three-year, $25 million deal with a player option in Year 3. Miles is one of the NBA's better spot-up shooters on the wing.

The Raptors cleared DeMarre Carroll on Saturday evening in a trade with the Brooklyn Nets.

Joseph signed a four-year, $30 million deal with the Raptors in 2015. Delon Wright can replace Joseph as Toronto's backup point guard.