Mercurial > octave
view examples/code/funcdemo.cc @ 31248:8b75954a4670
delaunayn: adjust node ordering for positive outward normal vectors (bug #53397)
* delaunayn.m: Check sign of simplex volume, flip node order for negative
volumes to ensure positive (outward-pointing) normal vectors. Add BISTs to
check for positive volumes.
* etc/News.8.md: Append function improvement note to delaunayn change
paragraph under General Improvements.
author | Nicholas R. Jankowski <jankowski.nicholas@gmail.com> |
---|---|
date | Thu, 29 Sep 2022 23:09:05 -0400 |
parents | d7e4d9b383ff |
children |
line wrap: on
line source
#include <octave/oct.h> #include <octave/parse.h> DEFMETHOD_DLD (funcdemo, interp, args, nargout, "Function Demo") { int nargin = args.length (); if (nargin < 2) print_usage (); octave_value_list newargs; for (octave_idx_type i = nargin - 1; i > 0; i--) newargs(i-1) = args(i); octave_value_list retval; if (args(0).is_function_handle () || args(0).is_inline_function () || args(0).is_string ()) retval = interp.feval (args(0), newargs, nargout); else error ("funcdemo: INPUT must be string, inline, or function handle"); return retval; }