Mercurial > octave-nkf
diff scripts/elfun/tand.m @ 13286:49ae6f497171
Use common code idiom x == fix (x) to detect integers
* cosd.m, sind.m, tand.m, duplication_matrix.m: Use common code idiom
x == fix (x) to detect integers.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Fri, 07 Oct 2011 08:28:00 -0700 |
parents | c792872f8942 |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/scripts/elfun/tand.m Thu Oct 06 23:39:14 2011 +0100 +++ b/scripts/elfun/tand.m Fri Oct 07 08:28:00 2011 -0700 @@ -33,8 +33,8 @@ I0 = x / 180; I90 = (x-90) / 180; y = tan (I0 .* pi); - y(I0 == round (I0) & finite (I0)) = 0; - y(I90 == round (I90) & finite (I90)) = Inf; + y(I0 == fix (I0) & finite (I0)) = 0; + y(I90 == fix (I90) & finite (I90)) = Inf; endfunction; %!error(tand())