Three-point specialist Doug McDermott has retired from the NBA after 12 seasons spent with seven teams.