lt: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=lt |proposed=false |trusted=false |description= This function compares provided numeric values and returns {{code|true(1)}} if the first is less than the...")
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 7: Line 7:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
lt(n1, n2, ...)
lt(n1, n2, ...)
</source>
</syntaxhighlight>
'''Parameters'''
'''Parameters'''
{{param|n1|Number}}
{{param|n1|Number}}
Line 15: Line 15:


|example=
|example=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r: lt(1,2)]
[r: lt(1,2)]
[r: lt(-1,1,2)]
[r: lt(-1,1,2)]
[r: lt(0,1,1)]
[r: lt(0,1,1)]
</source>
</syntaxhighlight>
'''Returns:'''
'''Returns:'''
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
1
1
1
1
0
0
</source>
</syntaxhighlight>


|also=
|also=
Line 33: Line 33:
[[Category:Macro Function]]
[[Category:Macro Function]]
[[Category:Mathematical Function]]
[[Category:Mathematical Function]]
[[Category:Logical Function]]

Latest revision as of 20:09, 15 March 2023

lt() Function

This function compares provided numeric values and returns true(1) if the first is less than the second and the second less than the third and so no. If any comparison fails, the function returns false.

Usage

lt(n1, n2, ...)

Parameters

  • n1 - Number
  • n2+ - Number

Example

[r: lt(1,2)]
[r: lt(-1,1,2)]
[r: lt(0,1,1)]

Returns:

1
1
0

See Also