mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Added more builtin inverse conversion functions
Added builtin functions to convert between degrees, minutes and seconds and degrees under the config("mod") round rules: dms2d(d, m, s [,rnd]) - convert deg, min, and secs to deg dm2d(d, m [,rnd]) - convert deg, min to deg See help/dms2d and help/dm2d. Example: ; print dms2d(12, 20, 44.16); 12.3456 ; print dm2d(3601, -25.5594); 0.57401 Added builtin functions to convert between gradians, minutes and seconds and gradians under the config("mod") round rules: gms2g(g, m, s [,rnd]) - convert grad, min, and secs to grad gm2g(g, m [,rnd]) - convert grad and min to grad See help/g2gms and help/g2gm. Example: ; print gms2g(12, 20, 44.16); 12.3456 ; print gm2g(4001, -25.5594); 0.57401 Added builtin functions to convert between hours, minutes and seconds and hours under the config("mod") round rules: hms2h(h, m, s [,rnd]) - convert hours, min, and secs to hours hm2h(h, m [,rnd]) - convert hours, min to hours See help/hms2h and help/hm2h. Example: ; print hms2h(12, 20, 44.16); 12.3456 ; print hm2h(241, -25.5594); 0.57401
This commit is contained in:
@@ -76,7 +76,7 @@ EXAMPLE
|
||||
; global d, m, s;
|
||||
|
||||
; print d2dms(12.3456,d,m,s), d, m, s;
|
||||
12.3456, 12, 20, 44.16
|
||||
12.3456 12 20 44.16
|
||||
; print d2dms(1234.5678,d,m,s), d, m, s;
|
||||
154.5678 154 34 4.08
|
||||
; print d2dms(-1234.5678,d,m,s), d, m, s;
|
||||
|
Reference in New Issue
Block a user