Mercurial > octave-nkf
diff scripts/general/rotdim.m @ 13279:984359717d71
Use common code idiom for checking whether a double value is an integer.
* num2str.m, rotdim.m, get_first_help_sentence.m, ind2rgb.m,
commutation_matrix.m, figure.m, legend.m, polyfit.m, bartlett.m, blackman.m,
detrend.m, hamming.m, hanning.m, factorial.m, mode.m, skewness.m, statistics.m,
mcnemar_test.m: Use idiom 'x == fix (x)' to test for integerness.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 05 Oct 2011 13:10:10 -0700 |
parents | 9e7ebbaf69ff |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/scripts/general/rotdim.m Wed Oct 05 12:00:31 2011 -0700 +++ b/scripts/general/rotdim.m Wed Oct 05 13:10:10 2011 -0700 @@ -94,7 +94,7 @@ endif else if (! (isvector (plane) && length (plane) == 2 - && all (plane == round (plane)) && all (plane > 0) + && all (plane == fix (plane)) && all (plane > 0) && all (plane < (nd + 1)) && plane(1) != plane(2))) error ("rotdim: PLANE must be a 2 element integer vector defining a valid PLANE"); endif