Moving to a point at a predefined constant speed

I can't figure this out for the life of me.
I want to move a body from point A to point B at a predefined constant speed.
I have no gravity or forces, so naturally I am thinking about setting the linear velocity of the body, but I can't figure how to take into account that the length of the segment (as in B - A) isn't necessarily dividable by the speed.

What should I do? It's important that the body moves at its predefined constant speed.

Thanks.
You can normalize a vector to get a vector that is in the same direction but of length 1, and then multiply this by the speed you want to move at:

b2Vec2 direction = b - a;
direction.Normalize();
b2Vec2 linearVelocity = desiredSpeed * direction;
I know that, but it wont be 100% correct at the arrival location, unless the speed is divisible by the actual length needed to be traveled. I thought about using a SetTransform at the end so that the body starts its next movement at the correct location, but it's pretty hackish, and it might be seen by our eyes.
I am making a path that objects need to follow, each with its own speed.
Then you just need to limit the velocity to be no more than required to get to the destination in one time step.
Linear velocity is given in units per second, so if you you are running at 60fps, in one time step the body will move 1/60 of the velocity.
As an example, if the body has a linear velocity of 12, that's 0.2 per time step. But if the destination is only 0.1 away, the velocity should be halved, to 6.
Yes but that would mean the speed isn't constant, see my problem?
Not really, no. The speed is constant until the very last time step (typically 1/60 of a second) before reaching the destination - you must be using much longer time step lengths if you can actually notice the speed change.
This worked fine with nice numbers, as expected, but failed miserably with what I can only guess to be rounding errors when using weird coordinates. No matter though, this sort of meets my needs anyway, so thanks.
What do you mean by 'failed miserably' and 'weird coordinates'? Perhaps if you post some code we can spot the trouble.

Original thread: https://box2d.org/forum/viewtopic.php?t=9261