Skip to content

getPointAtLength returns incorrect value for lengths exactly on segment intersections. #61

@SelfMadeSystem

Description

@SelfMadeSystem

getPointAtLength returns incorrect value for length exactly on segment intersections. I think the culprit is the if statement

// native `getPointAtLength` behavior when the given distance
// is higher than total length
if (distance > totalLength - DISTANCE_EPSILON) {
  return { x, y };
}

that should only go through if we're at the end of sub path, not at the end of any individual segment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions