That's the code to Carlo's old swim forces, right?
Yeah, it took me a long time to decipher it. The way I listed it above is more elegant mathematically speaking, and has the exact same logic. Don't ask me questions about Carlo's code, because it makes my brain hurt.
Well, I suppose if you really want to know, I could look at it again. Just not now.
Anyway, as I mentioned above, the force of Drag on a cylinder is: density of fluid * Cd * radius of cylinder * velocity perpindicular to cylinder ^ 2 per unit length. Carlo's code, by the way, assumes that density of the fluid, Cd and radius of the cylinder are all calculated and constant, and stored in the swim factor. Problem is Cd is a crazy function that can only really be constructed experimentally, and is a bitch to model.
Here's what Cd looks like for spheres and cyliders. Gawk and awe at its subtle complexity.

For slowly moving objects, something called viscous drag is in effect. This is things like a plastic marble sinking in water. The fluid follows a nice, smooth path and it ends up that the Cd changes such that it cancels out one of the velocities and Drag force is linearly proportional to velocity. This is the left part of the graph.
So Carlo's Algorithm works just fine for modelling, say, single celled creatures in water. But it fails at modelling faster flows, which are called turbulent.
Turbulent flows are things like airplanes flying through air. There is alot of random widgets (not a technical term) in the air flow, and it doesn't follow a smooth path. In such a case the force is quadratically related to velocity. This would be the right part of the graph.
This is why it requires roughly double the horsepower to make a car go relatively little faster at higher speeds. The faster you go, the harder and harder the medium pushes you back.
If you want to do independant research on this, here are technical terms you can look up:
viscous drag
turbulent drag
bluff body
Coefficient of Drag (or Drag Coefficient)
Drag Equation