Lasso Soft Inc. > Home

[Math_Round]

[Math_Round] rounds a number with specified precision. Requires two parameters. The first value is rounded to the same precision as the second value.

The second value is usually specified as 0.1, 0.01, 0.001, 0.0001, etc. depening on what precision is needed. The value of the second parameter is not important, only the amount of decimal precision it has.

  • Syntax
  • Parameters
[Math_Round Decimal ValueRound Value]

[Math_Round Decimal Value, 0.1]

[Math_Round Decimal Value, 0.01]

[Math_Round Decimal Value, 0.001]
Required Parameters
Decimal Value The first value is the value to be rounded.
Round Value The second value specifies the precision to which the first value should be rounded.
Examples

To round a number to 2 decimal places precision:

Use the [Math_Round] tag. The following example rounds the number 3.756 to two decimal places precision.

[Math_Round: 3.756, 0.01]
Result:
3.76
Tag Link [Math_Round] Category Math
Type Substitution Data Source Any
Support Preferred Version 3.0
Output Type Decimal or Integer Security None
Implementation Internal Sets Lasso 6.0, Lasso 5.0,LDML3x

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft