Thanks for the information Gilles,
I'll take a look att Geometry then.

As soon as I posted posted my question though, I got the idea of comparing
the lengths of the segments with the distance from their beginnings to the
line intersection. If longer, then the intersection is valid for the
segments.
It looks like that works for me, but I'll switch over to Geometry.

/Patrik


Den tors 28 maj 2020 kl 13:17 skrev Gilles Sadowski <gillese...@gmail.com>:

> Hello Patrik.
>
> 2020-05-28 9:39 UTC+02:00, Patrik Karlström <pata.karlst...@gmail.com>:
> > Hi,
> > first time user of math here, in more ways than one it feels. :)
> >
> > I need to get the shortest distance between two segments,
> > not knowing the difference, I started off by using 3d Line but until I
> knew
> > why, the result was disturbing. ;)
> >
> > However, the 3d Segment class is missing all sorts of methods compared to
> > the 3d Line class.
> >
> > Does commons math provide a way around this that allows me to get the
> > distances I need in a simple way?
> >
> > Oh, the intersection, if any, is of interest too.
> >
> > /Patrik
> >
>
> In the upcoming version of Commons Math (v4.0), the package
> "geometry" has been removed: Code has been ported to a new
> library:
>     https://commons.apache.org/geometry
>
> Please have a look, and if what you need is still missing, don't
> hesitate to repost (using the "[Geometry]" prefix in the subject).
>
> Best regards,
> Gilles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>

Reply via email to