octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #8827] mapping package: new functions wrap


From: Carnë Draug
Subject: [Octave-patch-tracker] [patch #8827] mapping package: new functions wrapTo 360, 2Pi, 180, Pi
Date: Thu, 24 Dec 2015 18:21:11 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.4.0

Follow-up Comment #12, patch #8827 (project octave):

This has been mentioned before on comment #2.

Can you please add some tests for this functions? The multiple cases by Philip
Nienhuis would work nicely.  For example, at the end of wrapToPi, you can add
the tests:


%!assert (wrapToPi (pi * [-3:.5:3]),  pi * [-1 -.5 0 -.5 -1 -.5  0 .5 1 .5 0
.5 1], eps)
%!assert (wrapToPi ([Inf NaN pi]),  [XX XX pi], eps)
## Test more than one dimensional vector
%!assert (wrapToPi (pi .* [-2 -1/2 0; 2 1/3 5/3]),  pi* [0 -1/2 0; 1 1/3 2/3],
eps)


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8827>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]