1NAME
2    dm2d, dms2d - convert degrees, minutes, and seconds to degrees
3
4SYNOPSIS
5    dm2d(d, m [,rnd])
6    dms2d(d, m, s [,rnd])
7
8TYPES
9    d		real
10    m		real
11    s		real (defaults to 0)
12    rnd		nonnegative integer, defaults to config("mod")
13
14    return	degrees
15
16DESCRIPTION
17    Convert degrees, m minutes, and s seconds returning degrees.
18
19    The return value in degrees, is equivalent to the following:
20
21	mod(d + m/60 + s/3600, 360, rnd);
22
23    Depending on the rounding mode, the return could be a real value
24    in the interval [0, 360) or a real value in the interval (-360, 0].
25    For the default round mode, the return value is in the interval [0, 360).
26
27    A missing rnd defaults to config("mod").
28    For more information on the effects of rnd, see "help mod".
29
30    The dm2d(d, m, rnd) builtin is an alias for dms2d(d, m, 0, rnd).
31
32EXAMPLE
33    ; print dm2d(203, 325.5594);
34    208.42599
35    ; print dm2d(3601, -25.5594);
36    0.57401
37    ; print dm2d(-923, -25.5594);
38    156.57401
39
40    ; print dms2d(12, 20, 44.16);
41    12.3456
42    ; print dms2d(123.456, -345.68, 4.08);
43    117.6958
44    ; print dms2d(-65, -40, -44.4);
45    294.321
46
47    ; print dm2d(203, 325.5594, 1);
48    -151.57401
49    ; print dms2d(12, 20, 44.16, 1);
50    -347.6544
51
52LIMITS
53    none
54
55LINK LIBRARY
56    none
57
58SEE ALSO
59    config, d2dm, d2dms, dm2d, dms2d, g2gm, g2gms, gm2g, gms2g,
60    h2hm, h2hms, hm2d, hms2d, mod
61
62## Copyright (C) 2021  Landon Curt Noll
63##
64## Calc is open software; you can redistribute it and/or modify it under
65## the terms of the version 2.1 of the GNU Lesser General Public License
66## as published by the Free Software Foundation.
67##
68## Calc is distributed in the hope that it will be useful, but WITHOUT
69## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
70## or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU Lesser General
71## Public License for more details.
72##
73## A copy of version 2.1 of the GNU Lesser General Public License is
74## distributed with calc under the filename COPYING-LGPL.  You should have
75## received a copy with calc; if not, write to Free Software Foundation, Inc.
76## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
77##
78## Under source code control:	2021/09/25 17:24:51
79## File existed as early as:	2021
80##
81## chongo <was here> /\oo/\	http://www.isthe.com/chongo/
82## Share and enjoy!  :-)	http://www.isthe.com/chongo/tech/comp/calc/
83