Well, what this amounts to is "stay calm and stay afloat". Because if you are being "swept out" this is a temporary situation. You need to conserve your energy to swim back in after you get out there, and things have calmed down. Or, if you end up way out there, stay calm and stay afloat. They will come for you. Be waiting.
If you are being carried out by a rip tide you should swim parallel to the beach. This is how you EXIT a rip tide. If you do it soon enough, you will not be far from the shore. Where people get in trouble is when they try to swim against the rip tide. Don’t fight it; just swim out of it.
We used to locate rip tides and ride them out past the surf line. We did this for body surfing and SCUBA diving.
Some of us don't float.
Good advice. Rip currents usually don’t last all that long,once you are out of its influence time to head for shore.Of course if you are swimming alone, that’s not too smart either.