I assume this would be used in integrate_forces().
If that's the case, I would also assume regardless of what you set linear velocity to, external forces such as gravity or other physics bodies will affect it after integrate forces. If so, the clamp only affects a body's speed before external forces are added to it. The actual total in-game velocity would look like this:
totalLinearVelocity = clampedLinearVelocity + VelocityFromExternalForces
This presents a problem if you want to clamp the total velocity.
Is there a way to tell the rigidbody to not exceed a certain velocity when affected by external forces?