Link | lp_math_degToHMS |
Author | Bil Corry |
Category | Math |
Version | 8.x |
License | Public Domain |
Posted | 21 Apr 2006 |
Updated | 21 Apr 2006 |
More by this author... |
Returns Hours:Minutes:Seconds given an angle in degrees.
Requires [lp_math_range360] [lp_string_pad]
(lp_math_degtohms: 359.99583);
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
[ define_tag:'lp_math_degToHMS', -description='Returns Hours:Minutes:Seconds given an angle in degrees.', -priority='replace', -required='degrees',-copy, -optional='delimiter'; if: !(local_defined:'delimiter'); local:'delimiter' = ':'; /if; #degrees = lp_math_range360: (decimal:#degrees); local:'hour' = (math_floor: #degrees / 15.0); #degrees -= (#hour * 15.0); local:'minute' = (math_floor: #degrees / 0.25); #degrees -= (#minute * .25); local:'second' = (integer: #degrees / 0.0041666666666666666666666666666667); return: (lp_string_pad: #hour, 2) (string:#delimiter) (lp_string_pad: #minute, 2) (string:#delimiter) (lp_string_pad: #second, 2); /define_tag; ]
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft