[latex3-commits] [git/LaTeX3-latex3-latex3] master: Avoid needing to look up a constant (8202478)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Feb 26 11:11:43 CET 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/82024784e6a58a8d6fef6a6460f369345c409bbd

>---------------------------------------------------------------

commit 82024784e6a58a8d6fef6a6460f369345c409bbd
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Feb 26 10:11:43 2018 +0000

    Avoid needing to look up a constant


>---------------------------------------------------------------

82024784e6a58a8d6fef6a6460f369345c409bbd
 l3experimental/l3draw/l3draw-softpath.dtx |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/l3experimental/l3draw/l3draw-softpath.dtx b/l3experimental/l3draw/l3draw-softpath.dtx
index 72f2278..eb051bc 100644
--- a/l3experimental/l3draw/l3draw-softpath.dtx
+++ b/l3experimental/l3draw/l3draw-softpath.dtx
@@ -370,6 +370,13 @@
 % \end{variable}
 % \end{variable}
 %
+% \begin{variable}{\c_@@_softpath_arc_fp}
+%   The magic constant.
+%    \begin{macrocode}
+\fp_const:Nn \c_@@_softpath_arc_fp { 4/3 * (sqrt(2) - 1) }
+%    \end{macrocode}
+% \end{variable}
+%
 % \begin{macro}{\@@_softpath_round_corners:}
 % \begin{macro}{\@@_softpath_round_loop:Nnn}
 % \begin{macro}{\@@_softpath_round_action:nn}
@@ -592,20 +599,20 @@
     \exp_not:N \@@_softpath_curveto_opi:nn
       {
         \fp_to_dim:n
-          { #5 + \fp_use:c { c_@@_path_arc_90_fp } * ( #1 - #5 ) }
+          { #5 + \c_@@_softpath_arc_fp * ( #1 - #5 ) }
       }
       {
         \fp_to_dim:n
-          { #6 + \fp_use:c { c_@@_path_arc_90_fp } * ( #2 - #6 ) }
+          { #6 + \c_@@_softpath_arc_fp * ( #2 - #6 ) }
       }
     \exp_not:N \@@_softpath_curveto_opii:nn
       {
         \fp_to_dim:n
-          { #7 + \fp_use:c { c_@@_path_arc_90_fp } * ( #1 - #7 ) }
+          { #7 + \c_@@_softpath_arc_fp * ( #1 - #7 ) }
       }
       {
         \fp_to_dim:n
-          { #8 + \fp_use:c { c_@@_path_arc_90_fp } * ( #2 - #8 ) }
+          { #8 + \c_@@_softpath_arc_fp* ( #2 - #8 ) }
       }
     \exp_not:N \@@_softpath_curveto_opiii:nn
       {#7} {#8}





More information about the latex3-commits mailing list