Today was a cool day for the Knicks: they agreed to sign Brandon Jennings to what will probably end up being a very favorable deal and brought back Lance Thomas as well. However, it wasn't all facially positive, as this happened too:

Update: Knicks have rescinded the $2.7 million qualifying offer to Langston Galloway, per sources. More: https://t.co/sRR79suXMs — Ian Begley (@IanBegley) July 4, 2016

Langston Galloway is now an Unrestricted Free Agent rather than a Restricted Free Agent, meaning that New York no longer can match other teams' offers to keep him on the team. Why did they do it, you ask? What's the end result of these moves, you ask? Good questions. Let me explain in gif form!

All of these salary numbers come with assists from HoopsHype and CBAFAQ except Lance's salary, which comes from Ian Begley. CBAFAQ also provided me with pretty much all of the knowledge I have about the salary cap because it's an amazing site.

To break it down in much more boring word form: as of this morning, the Knicks had about $4.37 million remaining in cap space, assuming they renounced their rights to Derrick Williams, Kevin Seraphin, Lou Amundson, and Sasha Vujacic. As you surely know, the Knicks and Brandon Jennings agreed upon a salary of around $5 million this year. You may remember that the CBA places what's called an "Empty Spot Hold" on teams operating under the salary cap for each player under the required minimum of 12 that the team has rights to. The Knicks held the rights to 9 players before adding Jennings, so they had 3 Empty Spot Holds (each at the first-year player minimum salary of $543,471) on the books. Jennings takes the spot of one of those holds; therefore, his $5 million salary effectively counts for only $4.46 million against the cap. But that means the Knicks were just short on cap space!

So what'd they do? They rescinded Lang's Qualifying Offer. An RFA's cap hold is the greater of his QO and whatever his cap hold would be if he were a UFA. Because Lang has been on the Knicks for 2 years, his UFA cap hold would be 130% of his previous salary, or $1.1 million. His QO was $2.7 million; therefore, Lang's cap hold was $2.7 million. By rescinding Galloway's QO, the Knicks reduced his cap hold to $1.1 million, thus freeing up the space necessary for Jennings.

There's been a lot of understandable confusion around the interwebs tonight on the repercussions of this move, so let me try to put that to rest. First, there is a difference between rescinding a Qualifying Offer and renouncing the rights to a free agent. As I've said, what the Knicks did earlier today (with respect to Lang, at least) is the former. By rescinding Galloway's Qualifying Offer, all New York actually did was lose its right of first refusal, or, to put it in more commonly used terms, its ability to match any offer sheet Lang signed with another team. Many people reported that the Knicks had both rescinded Lang's QO and renounced their rights to him, but that's not true. Under the CBA, a team may rescind a QO without renouncing its rights to that player as long as it does so before July 23rd.

Second, the Knicks can still go over the cap to sign Galloway. Because he's been on the team for 2 years, they hold what are called Early Bird rights on him. Early Bird rights allow a team to go over the cap to re-sign a player to a starting salary no greater than the average player salary. This season, the average player salary is estimated to be about $6.1 million, so the Knicks can sign Lang for any amount up to that number. However, now that he's a UFA, another team can offer Lang as much money as they want, and the Knicks can't do anything to stop him from leaving if he wants to.

Third, the Knicks have about $1.5 million left in cap space now, which means they can sign a player for up to $2 million thanks to the Empty Spot Hold thing I explained earlier. That may not seem like much, but the veteran's minimum salary for a player with at least 10 years of experience is $1.55 million this year, so that space could be instrumental in convincing a minimum player to choose New York over other teams.

One more note on the Jennings/Galloway two-step: you may be wondering why, if the difference between Jennings's salary and the Knicks' cap space before rescinding Lang's QO was so small, the team didn't ask Jennings or Joakim Noah or Courtney Lee to take slightly less money? Well, they could have. But I think rescinding Galloway's QO was the right move regardless. If New York had restructured one of the new signees' contracts, they would've given themselves just enough space to sign Jennings. But by rescinding Lang's QO, they now have that extra $1.5 million. Plus, I don't think the change of status from RFA to UFA will have any real effect on their efforts to re-sign Galloway. If a team offers him some exorbitant contract (i.e. a poison pill contract like the type the Rockets gave Jeremy Lin a few years ago), the Knicks probably would have let him go even if they could have matched. If a team offers him a reasonable contract, the Knicks will likely be able to get close enough that if Lang wants to stay in New York, it won't be unreasonable to do so. Basically, this is the right move in my mind.

Okay, let's move on to Lance Thomas! Just like with Langston Galloway, the Knicks hold Early Bird rights with respect to Lance. This is what will allow them to sign him to a 4-year contract starting at $6.1 million, the estimated average salary. (Quick note on the estimated average salary: the actual average salary will likely be much higher, but the NBA estimates the average salary for Early Bird contracts using the previous season's average, so it won't take the cap jump into account.) This would seemingly erase that $1.5 million in cap space I spent a paragraph explaining, but Phil Jackson and Steve Mills can again maneuver the cap to their advantage: Lance's cap hold of $2.1 million won't be replaced with his actual salary of $6.1 million until he sits down at the small table. And because the team can go over the cap to re-sign Thomas, there's no reason to officially sign him until they've spent their remaining cap space.

Finally, a lot of people have been asking about Willy Hernangomez and how he fits in here. The Knicks have two options with respect to Willy: 1. they can sign him to what's called the Room MLE, which is an exception that allows a team that started the summer under the cap, but subsequently went over it, to sign a player anyway; 2. they can use their remaining cap space to sign him. If New York goes with option #1, Willy's contract can be for either 1 or 2 years and will start at around $2.89 million. If New York goes with option #2, his contract can be for at most the $2 million in remaining cap space, but can be for up to 4 years. If I had to venture a guess, I'd say they go with the Room MLE.

That's the long and short (well, long and long) of it! By fully taking advantage of the CBA's nuances, the Knicks' front office was able to bring in Brandon Jennings, keep Lance Thomas, continue holding their rights to Langston Galloway, and leave some room for another free agent (possibly Willy Hernangomez!) under the cap. Pretty impressive if you ask me.