RE: A83: Calculating Distances Fast - any suggestions ?


[Prev][Next][Index][Thread]

RE: A83: Calculating Distances Fast - any suggestions ?




> > Since I really dont think there is a very good approximation
> > algorithm for distance (without tons of iterations), perhaps you can
> > attack the problem in a different manner.  For instance, I
> doubt when
> > drawing the lines for the vector based system you really
> need to know the
> > length of a straight line between the two points.
>
> Distance isn't used when drawing unfilled polygons, anyway.
> But it has
> many, many other uses in a vector engine, such as collision detection.

Most of the time when one uses the distance formula it is for comparison
(i.e. do you usually need just an absolute distance?).  If so, then you
can dump the square root on both sides since it will not affect the
relationship (larger or smaller) between two distances.




References: