[latex3-commits] [git/LaTeX3-latex3-latex3] master: Re-order arguments for l3draw polar functions (fixes #608) (60c3ab3a8)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Aug 18 23:59:04 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/60c3ab3a8126a9ede47cabf4dab775d6c68bca49

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

commit 60c3ab3a8126a9ede47cabf4dab775d6c68bca49
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Aug 18 22:58:56 2019 +0100

    Re-order arguments for l3draw polar functions (fixes #608)


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

60c3ab3a8126a9ede47cabf4dab775d6c68bca49
 l3experimental/CHANGELOG.md                   |  4 ++++
 l3experimental/l3draw/l3draw-paths.dtx        |  8 ++++----
 l3experimental/l3draw/l3draw-points.dtx       |  8 ++++----
 l3experimental/l3draw/l3draw.dtx              | 12 ++++++------
 l3experimental/l3draw/testfiles/m3draw001.lvt | 10 +++++-----
 5 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/l3experimental/CHANGELOG.md b/l3experimental/CHANGELOG.md
index 5ec4523e4..8a221b340 100644
--- a/l3experimental/CHANGELOG.md
+++ b/l3experimental/CHANGELOG.md
@@ -13,6 +13,10 @@ this project uses date-based 'snapshot' version identifiers.
 
 - New module `l3pdf`
 
+### Changed
+
+- Re-order arguments for polar points (`l3draw`)
+
 ### Removed
 
 - `l3str-convert` module: moved to `l3kernel` (`expl3` core)
diff --git a/l3experimental/l3draw/l3draw-paths.dtx b/l3experimental/l3draw/l3draw-paths.dtx
index af2f72698..4e241be9a 100644
--- a/l3experimental/l3draw/l3draw-paths.dtx
+++ b/l3experimental/l3draw/l3draw-paths.dtx
@@ -505,23 +505,23 @@
       { \@@_path_arc_auxiii:nn }
       {
         \@@_point_transform_noshift:n
-          { \draw_point_polar:nnn { #1 #4 90 } {#7} {#8} }
+          { \draw_point_polar:nnn {#7} {#8} { #1 #4 90 } }
       }
     \@@_point_process:nnn
       { \@@_path_arc_auxiv:nnnn }
       {
         \draw_point_transform:n
-          { \draw_point_polar:nnn {#1} {#5} {#6} }
+          { \draw_point_polar:nnn {#5} {#6} {#1} }
       }
       {
         \draw_point_transform:n
-          { \draw_point_polar:nnn {#2} {#5} {#6} }
+          { \draw_point_polar:nnn {#5} {#6} {#2} }
       }
     \@@_point_process:nn
       { \@@_path_arc_auxv:nn }
       {
         \@@_point_transform_noshift:n
-          { \draw_point_polar:nnn { #2 #4 -90 } {#7} {#8} }
+          { \draw_point_polar:nnn {#7} {#8} { #2 #4 -90 } }
       }
     \exp_after:wN \@@_path_curveto:nnnnnn \l_@@_path_tmp_tl
     \fp_set:Nn \l_@@_path_arc_delta_fp { abs ( #2 - #3 ) }
diff --git a/l3experimental/l3draw/l3draw-points.dtx b/l3experimental/l3draw/l3draw-points.dtx
index 510b6534b..bea0fc8ac 100644
--- a/l3experimental/l3draw/l3draw-points.dtx
+++ b/l3experimental/l3draw/l3draw-points.dtx
@@ -199,9 +199,9 @@
 %   save on any expression evaluation there and force expansion.
 %    \begin{macrocode}
 \cs_new:Npn \draw_point_polar:nn #1#2
-  { \draw_point_polar:nnn {#1} {#2} {#2} }
+  { \draw_point_polar:nnn {#1} {#1} {#2} }
 \cs_new:Npn \draw_point_polar:nnn #1#2#3
-  { \@@_draw_polar:fnn { \fp_eval:n {#1} } {#2} {#3} }
+  { \@@_draw_polar:fnn { \fp_eval:n {#3} } {#1} {#2} }
 \cs_new:Npn \@@_draw_polar:nnn #1#2#3
   { \@@_point_to_dim:n { cosd(#1) * (#2) , sind(#1) * (#3) } }
 \cs_generate_variant:Nn \@@_draw_polar:nnn { f }
@@ -856,9 +856,9 @@
 %   Much the same as the core polar approach.
 %    \begin{macrocode}
 \cs_new:Npn \draw_point_vec_polar:nn #1#2
-  { \draw_point_vec_polar:nnn {#1} {#2} {#2} }
+  { \draw_point_vec_polar:nnn {#1} {#1} {#2} }
 \cs_new:Npn \draw_point_vec_polar:nnn #1#2#3
-  { \@@_draw_vec_polar:fnn { \fp_eval:n {#1} } {#2} {#3} }
+  { \@@_draw_vec_polar:fnn { \fp_eval:n {#3} } {#1} {#2} }
 \cs_new:Npn \@@_draw_vec_polar:nnn #1#2#3
   {
     \@@_point_to_dim:n
diff --git a/l3experimental/l3draw/l3draw.dtx b/l3experimental/l3draw/l3draw.dtx
index bb2661de0..e3169af18 100644
--- a/l3experimental/l3draw/l3draw.dtx
+++ b/l3experimental/l3draw/l3draw.dtx
@@ -404,8 +404,8 @@
 %
 % \begin{function}[EXP]{\draw_point_polar:nn, \draw_point_polar:nnn}
 %   \begin{syntax}
-%     \cs{draw_point_polar:nn} \Arg{angle} \Arg{radius}
-%     \cs{draw_point_polar:nnn} \Arg{angle} \Arg{radius-a} \Arg{radius-b}
+%     \cs{draw_point_polar:nn} \Arg{radius} \Arg{angle}
+%     \cs{draw_point_polar:nnn} \Arg{radius-a} \Arg{radius-b} \Arg{angle}
 %   \end{syntax}
 %   Gives the co-ordinates of the point at \meta{angle} (an \meta{fp expr} in
 %   \emph{degrees}) and \meta{radius}. The three-argument version accepts
@@ -462,8 +462,8 @@
 %
 % \begin{function}[EXP]{\draw_point_vec_polar:nn, \draw_point_vec_polar:nnn}
 %   \begin{syntax}
-%     \cs{draw_point_vec_polar:nn} \Arg{angle} \Arg{radius}
-%     \cs{draw_point_vec_polar:nnn} \Arg{angle} \Arg{radius-a} \Arg{radius-b}
+%     \cs{draw_point_vec_polar:nn} \Arg{radius} \Arg{angle}
+%     \cs{draw_point_vec_polar:nnn} \Arg{radius-a} \Arg{radius-b} \Arg{angle}
 %   \end{syntax}
 %   Gives the co-ordinates of the point at \meta{angle} (an \meta{fp expr} in
 %   \emph{degrees}) and \meta{radius}, relative to the prevailing
@@ -580,11 +580,11 @@
 %     \draw_begin:
 %       \draw_path_corner_arc:nn { 4pt } { 4pt }
 %       \draw_path_moveto:n
-%         { \draw_point_polar:nn { 0 } { 1cm } }
+%         { \draw_point_polar:nn { 1cm } { 0 } }
 %       \int_step_inline:nnnn { 72 } { 72 } { 359 }
 %         {
 %           \draw_path_lineto:n
-%             { \draw_point_polar:nn { #1 } { 1cm } }
+%             { \draw_point_polar:nn { 1cm } { #1 } }
 %         }
 %        \draw_path_close:
 %       \draw_path_use_clear:n { stroke }
diff --git a/l3experimental/l3draw/testfiles/m3draw001.lvt b/l3experimental/l3draw/testfiles/m3draw001.lvt
index 11f42c241..99a989f7f 100644
--- a/l3experimental/l3draw/testfiles/m3draw001.lvt
+++ b/l3experimental/l3draw/testfiles/m3draw001.lvt
@@ -15,11 +15,11 @@
 
 \TESTEXP { \draw_point_polar:nn(n) }
   {
-    \draw_point_polar:nn { 30 } { 1cm }
+    \draw_point_polar:nn { 1cm } { 30 }
     \NEWLINE
-    \draw_point_polar:nnn { 30 } { 1cm } { 2cm }
+    \draw_point_polar:nnn { 1cm } { 2cm } { 30 }
     \NEWLINE
-    \draw_point_polar:nnn { 15 + 15 } { 2 * 0.5cm } { 2 * 1cm }
+    \draw_point_polar:nnn { 2 * 0.5cm } { 2 * 1cm } { 15 + 15 }
     \NEWLINE
   }
 
@@ -144,9 +144,9 @@
 
 \TESTEXP { \draw_point_vec_polar:nn(n) }
   {
-    \draw_point_vec_polar:nn { 30 } { 2 }
+    \draw_point_vec_polar:nn { 2 } { 30 }
     \NEWLINE
-    \draw_point_vec_polar:nnn { 30 } { 1 } { 2 }
+    \draw_point_vec_polar:nnn { 1 } { 2 } { 30 }
   }
 
 \END





More information about the latex3-commits mailing list