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: Philip Nienhuis
Subject: [Octave-patch-tracker] [patch #8827] mapping package: new functions wrapTo 360, 2Pi, 180, Pi
Date: Thu, 24 Dec 2015 19:47:24 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38

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

Here's my version of wrapTo180.m, including a test.

I find that due to numerical inaccuracy, the interval actually is [-180-(e-14)
 180+(e-14)] but let's call that reasonable :-)

@Oscar:
In your defense I admit that this isn't as easy as it looks at first sight.
Esp. the closed interval at both ends is challenging, otherwise it would have
been a simple 
rem(X+shift>, <interval_length>) - <shift>

Maybe you can use my wrapTo180.m version as a template.


(file #35853)
    _______________________________________________________

Additional Item Attachment:

File name: wrapTo180.m                    Size:1 KB


    _______________________________________________________

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]