Link | lp_math_range360 |
Author | Bil Corry |
Category | Math |
Version | 8.x |
License | Public Domain |
Posted | 20 Apr 2006 |
Updated | 20 Apr 2006 |
More by this author... |
Returns degrees in the range of 0 to 360 given an angle in degrees.
Requires [lp_decimal_precisionset] [lp_math_mod]
lp_math_deg360: -370;'
'; // 350 lp_math_deg360: -10.222;'
'; // 349.778 lp_math_deg360: 10.222;'
'; // 10.222 lp_math_deg360: 180;'
'; // 180 lp_math_deg360: 360;'
'; // 0 lp_math_deg360: 370.22223;'
'; // 10.22223 lp_math_deg360: 0;'
'; // 0
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_range360', -description='Returns degrees in the range of 0 to 360 given an angle in degrees.', -priority='replace', -required='degrees'; if: (decimal:#degrees) >= 0.0 && (decimal:#degrees) < 360.0; return: (lp_decimal_precisionset:(decimal:#degrees)); else: (decimal:#degrees) < 0.0; return: (lp_decimal_precisionset: 360.0 - (lp_math_mod: (math_abs:(decimal:#degrees)),360.0)); else; // >= 360.0 return: (lp_decimal_precisionset: (lp_math_mod: (decimal:#degrees),360.0)); /if; /define_tag; ]
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft