Well if you want a range between 6 and 22, you would want it to add 6, rather than 22. I'm sure there is a better way of doing this but: ABS(A-ABS(A-B)) should give the lower number of the two.
Final equation:
NumC=ABS(A-ABS(A-B))+RND(ABS(A-B))
So NumC=6+RND(ABS(22-6)) yields 6+RND(16) which in turn leaves us at a range of 6->22.
Conversely if it is NumC=6+RND(ABS(6-22)) then NumC=6+RND(ABS(-16)) which is NumC=6+RND(16) which is the same as above.
The only hangup about it is that I have heard that the ABS command is a rather slow one, though I can't confirm this. You probably won't see any kind of impact unless you call it constantly along with displaying lots of 3d objects and such.
Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose