diff scripts/elfun/tand.m @ 14220:5a13a75c2457

Use Octave spacing conventions for scripts in elfun/ directory. * acosd.m, acot.m, acotd.m, acoth.m, acsc.m, acscd.m, acsch.m, asec.m, asecd.m, asech.m, asind.m, atand.m, cosd.m, cot.m, cotd.m, coth.m, csc.m, cscd.m, csch.m, sec.m, secd.m, sech.m, sind.m, tand.m: Use Octave spacing conventions.
author Rik <octave@nomad.inbox5.com>
date Wed, 18 Jan 2012 21:17:14 -0800
parents 72c96de7a403
children f3d52523cde1
line wrap: on
line diff
--- a/scripts/elfun/tand.m	Wed Jan 18 21:16:04 2012 -0800
+++ b/scripts/elfun/tand.m	Wed Jan 18 21:17:14 2012 -0800
@@ -27,18 +27,23 @@
 ## Author: David Bateman <dbateman@free.fr>
 
 function y = tand (x)
+
   if (nargin != 1)
     print_usage ();
   endif
+
   I0 = x / 180;
   I90 = (x-90) / 180;
   y = tan (I0 .* pi);
   y(I0 == fix (I0) & finite (I0)) = 0;
   y(I90 == fix (I90) & finite (I90)) = Inf;
-endfunction;
+
+endfunction
+
 
-%!error(tand())
-%!error(tand(1,2))
-%!assert(tand(10:10:80),tan(pi*[10:10:80]/180),-10*eps)
-%!assert(tand([0,180,360]) == 0)
-%!assert(tand([90,270]) == Inf)
+%!assert (tand (10:10:80), tan (pi*[10:10:80]/180), -10*eps)
+%!assert (tand ([0, 180, 360]) == 0)
+%!assert (tand ([90, 270]) == Inf)
+
+%!error tand ()
+%!error tand (1, 2)