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