diff scripts/geometry/voronoin.m @ 13879:440d7914cf01

fix regression in __voronoi__ and convhulln option processing * __voronoi__.cc (F__voronoi__): Allow user-supplied options to completely replace defaults. * convhulln.cc (F__convhulln__): Likewise. * __voronoi__.cc (F__voronoi__): New argument, caller. * voronoi.m, voronoin.m: Pass name of function to __voronoi__. * voronoin.m: Don't check options here. * voronoi.m: Don't check nargout.
author John W. Eaton <jwe@octave.org>
date Thu, 17 Nov 2011 13:47:12 -0500
parents 7ff0bdc3dc4c
children 72c96de7a403
line wrap: on
line diff
--- a/scripts/geometry/voronoin.m
+++ b/scripts/geometry/voronoin.m
@@ -48,14 +48,14 @@
 
   if (np <= dim)
     error ("voronoin: number of points must be greater than their dimension");
-  elseif (nargin == 2 && ! (ischar (options) || iscellstr (options)))
-    error ("voronoin: OPTIONS argument must be a string or cell array of strings");
   endif
 
+  caller = "voronoin";
+
   if (nargin == 1)
-    [C, F] = __voronoi__ (pts);
+    [C, F] = __voronoi__ (caller, pts);
   else
-    [C, F] = __voronoi__ (pts, options);
+    [C, F] = __voronoi__ (caller, pts, options);
   endif
 
 endfunction