]> Creatis software - CreaPhase.git/blob - octave_packages/nurbs-1.3.6/rad2deg.m
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / nurbs-1.3.6 / rad2deg.m
1 function deg = rad2deg(rad)
2
3 % RAD2DEG: Convert radians to degrees.
4
5 % Calling Sequence:
6
7 %   rad = rad2deg(deg);
8
9 % INPUT:
10
11 %   rad         : Angle in radians.
12 %
13 % OUTPUT:
14 %
15 %   deg         : Angle in degrees.
16
17 % Description:
18
19 %   Convenient utility function for converting radians to degrees, which are
20 %   often the required angular units for functions in the NURBS toolbox.
21
22 % Examples:
23
24 %   Convert 0.3 radians to degrees
25
26 %   rad = deg2rad(0.3);
27 %
28 %    Copyright (C) 2000 Mark Spink
29 %
30 %    This program is free software: you can redistribute it and/or modify
31 %    it under the terms of the GNU General Public License as published by
32 %    the Free Software Foundation, either version 2 of the License, or
33 %    (at your option) any later version.
34
35 %    This program is distributed in the hope that it will be useful,
36 %    but WITHOUT ANY WARRANTY; without even the implied warranty of
37 %    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38 %    GNU General Public License for more details.
39 %
40 %    You should have received a copy of the GNU General Public License
41 %    along with this program.  If not, see <http://www.gnu.org/licenses/>.
42
43 deg = 180.0*rad/pi;
44
45 end