algorithm – Swept AABB vs Line Segment in 2D

I’ve been trying to get a swept collision detection up and running now for almost a week and I can’t for the life of me get it working.

Example image

There is a answer on this linked here below:
Swept AABB vs Line Segment 2D

I’ve translated this into Go which will be running the game server and needs this logic. I put up a Gist here

I can’t for the life of me figure out what all class variables stand for. I think that some of them are native to Unity but that’s just a guess. I’ve come so far as to figure out that the extent is half of the width/height in said direction. What the “line.n” stands for is anyones guess, I assume its the direction and have no idea if it’s normalized or not.

There are also a couple of dead variables just laying there.