Mercurial > octave
annotate test/bug-53579.tst @ 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 | 34617dd78f02 |
children | 332a6ccac881 |
rev | line source |
---|---|
25203
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 %!function [raa, rbb, igaa, igbb] = sub1 (aa, bb) |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 %! global aa bb |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
3 %! aa = 1; |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
4 %! raa = aa; |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
5 %! rbb = bb; |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
6 %! igaa = isglobal ("aa"); |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 %! igbb = isglobal ("bb"); |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 %!endfunction |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
10 %!test <*53579> |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
11 %! global aa bb |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
12 %! assert (isglobal ("aa")); |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
13 %! assert (isglobal ("bb")); |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
14 %! aa = 3; |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
15 %! xx = 5; |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
16 %! [raa, rbb, igaa, igbb] = sub1 (aa, xx); |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
17 %! assert (raa, 1); |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
18 %! assert (rbb, []); |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
19 %! assert (igaa); |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
20 %! assert (igbb); |
72ea868ca63a
allow function parameters to be global (bug #53579)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
21 %! assert (xx, 5); |
26182
34617dd78f02
avoid possible leaked global variables in tests
John W. Eaton <jwe@octave.org>
parents:
25203
diff
changeset
|
22 %! clear -global aa bb; # cleanup after test |