there is a quicker way using vectors that u should be able to do mathmatically in dbc, ill try to work it out as i go.... basically
ok
**1** **2**
Y A _ *A
|...*\ | : \
| : \ _/ 4 : \ X
| : \ \ : \
|---:--*C |_ : \
| : | B-----*C
¯¯¯¯¯¯¯¯X 3
i hope they turn out ok...
in the first picture we can see the points a and c no if we get the difference in there x and y position we will end up with the side lengths in the second diagram...everyone following ?

now using simple trig. we can find one of the angles <A or <C ill chose A so:
tan A = 3/4 ... tan^-1 3/4 = 36.870°
then to find the hyp we go :
sin 36 = 3/X so X = 3 / sin 36 = 5
which makes the dist between A and C exactly 5
and if anyone knew that 3,4,5 is a pythagorian triple u would see that it worked (i hope i didnt stuff up)
only thing is that this might not be much quicker, if done this much now someone else can test that and seewhats faster. im guessing this is
#edit - i lied i dont think that thats really vector based ... vector based dist calcs. are exactly the same u find the difference in x and y then use pyth.