Mercurial > octave-nkf
diff scripts/geometry/delaunay.m @ 17174:c3c1ebfaa7dc
maint: Use common indentation for switch statement.
* scripts/general/interp1.m, scripts/geometry/delaunay.m,
scripts/help/__unimplemented__.m, scripts/image/cmunique.m,
scripts/miscellaneous/edit.m, scripts/optimization/fzero.m,
scripts/optimization/sqp.m, scripts/plot/__gnuplot_drawnow__.m,
scripts/plot/hidden.m, scripts/plot/legend.m, scripts/plot/print.m,
scripts/plot/printd.m, scripts/plot/private/__contour__.m,
scripts/plot/private/__fltk_print__.m,
scripts/plot/private/__gnuplot_print__.m,
scripts/plot/private/__go_draw_axes__.m,
scripts/plot/private/__print_parse_opts__.m, scripts/signal/periodogram.m,
scripts/sparse/bicg.m, test/slice.tst, test/switch.tst:
Use common indentation for switch statement.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 04 Aug 2013 15:11:34 -0700 |
parents | f72ffae1fcc3 |
children | 1c89599167a6 |
line wrap: on
line diff
--- a/scripts/geometry/delaunay.m Sun Aug 04 17:27:40 2013 -0400 +++ b/scripts/geometry/delaunay.m Sun Aug 04 15:11:34 2013 -0700 @@ -74,38 +74,38 @@ switch (nargin) - case 1 - if (! ismatrix (varargin{1}) || columns (varargin{1}) != 2) - error ("delaunay: X must be a matrix with 2 columns"); - else - x = varargin{1}(:,1); - y = varargin{1}(:,2); - endif - - case 2 - if (isnumeric (varargin{2})) - x = varargin{1}; - y = varargin{2}; - elseif (ischar (varargin{2}) || iscellstr (varargin{2})) - options = varargin{2}; - if (! ismatrix (varargin{1}) && columns (varargin{1}) != 2) + case 1 + if (! ismatrix (varargin{1}) || columns (varargin{1}) != 2) error ("delaunay: X must be a matrix with 2 columns"); else x = varargin{1}(:,1); y = varargin{1}(:,2); endif - else - error ("delaunay: OPTIONS must be a string or cell array of strings"); - endif + + case 2 + if (isnumeric (varargin{2})) + x = varargin{1}; + y = varargin{2}; + elseif (ischar (varargin{2}) || iscellstr (varargin{2})) + options = varargin{2}; + if (! ismatrix (varargin{1}) && columns (varargin{1}) != 2) + error ("delaunay: X must be a matrix with 2 columns"); + else + x = varargin{1}(:,1); + y = varargin{1}(:,2); + endif + else + error ("delaunay: OPTIONS must be a string or cell array of strings"); + endif - case 3 - x = varargin{1}; - y = varargin{2}; - options = varargin{3}; + case 3 + x = varargin{1}; + y = varargin{2}; + options = varargin{3}; - if (! (ischar (options) || iscellstr (options))) - error ("delaunay: OPTIONS must be a string or cell array of strings"); - endif + if (! (ischar (options) || iscellstr (options))) + error ("delaunay: OPTIONS must be a string or cell array of strings"); + endif endswitch