diff --git a/tex/generic/pgf/libraries/pgflibraryintersections.code.tex b/tex/generic/pgf/libraries/pgflibraryintersections.code.tex index 6bed3e47..1f30b257 100644 --- a/tex/generic/pgf/libraries/pgflibraryintersections.code.tex +++ b/tex/generic/pgf/libraries/pgflibraryintersections.code.tex @@ -552,13 +552,13 @@ % <=> |s| * ||#2 - #1|| < eps % and, since s< 0 here: % <=> -s * ||#2 - #1|| < eps - \pgf@xa=-\pgf@intersect@len@a\pgf@x - \ifdim\pgf@xa<\pgfintersectiontolerance\relax - % close enough to first endpoint of line 1: - \def\pgf@marshal{1}% - \else - \def\pgf@marshal{0}% - \fi + \begingroup + \pgfkeys{/pgf/fpu,/pgf/fpu/output format=float}% + \pgfmathfloatparse{-\pgf@intersect@len@a*\pgf@x<\pgfintersectiontolerance}% + \pgfmath@smuggleone{\pgfmathresult}% + \endgroup + \pgfmathfloattoint{\pgfmathresult}% + \let\pgf@marshal\pgfmathresult \else \ifdim\pgf@x>1pt % let it count as hit if @@ -566,14 +566,13 @@ % <=> |s-1| * ||#2 - #1|| < eps % and, since s > 1 here: % <=> s * ||#2 - #1|| - ||#2 - #1|| < eps - \pgf@xa=\pgf@intersect@len@a\pgf@x - \advance\pgf@xa by-\pgf@intersect@len@a pt % - \ifdim\pgf@xa<\pgfintersectiontolerance\relax - % close enough to second endpoint of line 1: - \def\pgf@marshal{1}% - \else - \def\pgf@marshal{0}% - \fi + \begingroup + \pgfkeys{/pgf/fpu,/pgf/fpu/output format=float}% + \pgfmathfloatparse{\pgf@intersect@len@a*\pgf@x-\pgf@intersect@len@a<\pgfintersectiontolerance}% + \pgfmath@smuggleone{\pgfmathresult}% + \endgroup + \pgfmathfloattoint{\pgfmathresult}% + \let\pgf@marshal\pgfmathresult \else % 0<= s <= 1: we have an intersection within line 1. \def\pgf@marshal{1}% @@ -584,24 +583,23 @@ \if1\pgf@marshal \ifdim\pgf@y<0sp % see remarks for line 1. same applies here. - \pgf@xa=-\pgf@intersect@len@b\pgf@y - \ifdim\pgf@xa<\pgfintersectiontolerance\relax - % close enough to first endpoint of line 2: - \def\pgf@marshal{1}% - \else - \def\pgf@marshal{0}% - \fi + \begingroup + \pgfkeys{/pgf/fpu,/pgf/fpu/output format=float}% + \pgfmathfloatparse{-\pgf@intersect@len@b*\pgf@y<\pgfintersectiontolerance}% + \pgfmath@smuggleone{\pgfmathresult}% + \endgroup + \pgfmathfloattoint{\pgfmathresult}% + \let\pgf@marshal\pgfmathresult \else \ifdim\pgf@y>1pt % see remarks for line 1. same applies here. - \pgf@xa=\pgf@intersect@len@b\pgf@y - \advance\pgf@xa by-\pgf@intersect@len@b pt % - \ifdim\pgf@xa<\pgfintersectiontolerance\relax - % close enough to second endpoint of line 2: - \def\pgf@marshal{1}% - \else - \def\pgf@marshal{0}% - \fi + \begingroup + \pgfkeys{/pgf/fpu,/pgf/fpu/output format=float}% + \pgfmathfloatparse{\pgf@intersect@len@b*\pgf@y-\pgf@intersect@len@b<\pgfintersectiontolerance}% + \pgfmath@smuggleone{\pgfmathresult}% + \endgroup + \pgfmathfloattoint{\pgfmathresult}% + \let\pgf@marshal\pgfmathresult \else % 0<= t <= 1: we have an intersection within line 2. \def\pgf@marshal{1}%