[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46340] move deg2rad/rad2deg from nurbs or map
From: |
Carnë Draug |
Subject: |
[Octave-bug-tracker] [bug #46340] move deg2rad/rad2deg from nurbs or mapping to core |
Date: |
Sat, 31 Oct 2015 19:18:15 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0 |
Update of bug #46340 (project octave):
Summary: move deg2rad/rad2deg from nurbs to core => move
deg2rad/rad2deg from nurbs or mapping to core
_______________________________________________________
Follow-up Comment #3:
Matlab is crazy. Originally had rad2deg and deg2rad in the mapping toolbox.
Then it renamed those as radtodeg and degtorad, also in the mapping toolbox.
And now brings back rad2deg and deg2rad and places them in core.
Anyway, to answer the question, the function in nurbs and mapping have the
same interface but the implementation in the mapping toolbox will be faster.
http://hg.code.sf.net/p/octave/mapping/rev/092dc26b88b7
If N is the number of angles, the implementation in mapping performs one
division and N multiplications, while the one in nurbs performs N divisions
and N multiplications.
Consider:
# deg2rad_nurbs
rad = pi*deg/180.0;
# rad2deg_mapping
rad = deg * (pi/180.0);
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46340>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/