Skip to content

LineLocatePoint in the Euclidean space spends a lot of time calculating hypotΒ #1320

@AndrewLipscomb

Description

@AndrewLipscomb

Image

LineLocatePoint appears to spend a lot of time calculating a hypotenuse. I believe some of these calculations are unnecessary.

At the very least

let segment_distance_to_point = segment.euclidean_distance(p);
appears to only be used for "shortest seen so far", that could be the cheaper non-sqrt'ed distance.

I believe the other values will all need to be sqrt'ed - but given there is one potential improvement in there, maybe worth a double check from the more knowledgable guys here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions