Difference between revisions of "LC"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Low Post
imported>Low Post
Line 7: Line 7:


Used to perform accurate calculations on very large or very small integer variables, as the Oblivion [[Set]] command is only accurate for variables within the range [-8,388,608, 8,388,607].
Used to perform accurate calculations on very large or very small integer variables, as the Oblivion [[Set]] command is only accurate for variables within the range [-8,388,608, 8,388,607].
If Rounded == 0 the result is truncated, otherwise everything above .5 is rounded up.
If Rounded == 0 the result is truncated, otherwise everything above .5 is rounded up.



Revision as of 08:52, 26 April 2009


A command for Pluggy.

Syntax:

(Result:long) LC Rounded:bool Formula:string $0:long $1:long ... $8:long $9:long

Used to perform accurate calculations on very large or very small integer variables, as the Oblivion Set command is only accurate for variables within the range [-8,388,608, 8,388,607].

If Rounded == 0 the result is truncated, otherwise everything above .5 is rounded up.

Example

set Result to LC 0 "$0 – ( $1 + $2 / $4 ) % $0 * $3" Long0 Long1 Long2 1478 Long4