[lp_decimal_fixed]

Description

Link: [lp_decimal_fixed]
Author: Bil Corry
Category: Math
Version: 8.x
License: Public Domain
Posted: Feb. 12, 2006
Updated: Jan. 01, 0001
More by this author...
Returns the fixed part of a given decimal number.  It acts the same as math_floor on positive numbers and math_ceil on negative numbers.

Requires [lp_decimal_precisionset]

Parameters

-decimal decimal, required The decimal to extracted the fixed part of.

Sample Usage

lp_decimal_fixed: lp_math_pi;'<br>';
// returns: 3
						

Source Code

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.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[

define_tag:'lp_decimal_fixed',
	-description='Returns the fixed part of a given decimal number.',
	-priority='replace',
	-required='decimal';

	// same as math_floor on positive numbers and math_ceil on negative numbers

	return: integer: (string: (lp_decimal_precisionset:(decimal: #decimal), 64))->(split:'.')->(get:1);

/define_tag;

]

 

Related Tags



Comments

none

Email:


Password:



Newest

Most Popular