Difference between revisions of "Oblivion XML Reference/Operators"

Jump to navigation Jump to search
imported>DavidJCobb
(started)
 
imported>DavidJCobb
Line 81: Line 81:


== Other operators ==
== Other operators ==
;abs
:If the current working value is less than zero, then the operator’s argument is added to it, and the operator returns the absolute value of the result. Otherwise, the current working value is returned verbatim.
;add
:Adds its value to the current working value, and returns the result.
;and
:Returns <code>&amp;true;</code> if both the current working value and the operator’s argument evaluate to <code>&amp;true;</code>, or <code>&amp;false;</code>
;ceil
:Returns the current working value rounded up to the nearest integer. Disassembly of the executable suggests that the operator’s argument is added to the current working value before the rounding is performed.
;div
:Divides the current working value by the argument, and returns the result.
;eq
:Returns <code>&amp;true;</code> if the current working value is equal to the argument, or <code>&amp;false;</code> otherwise. Note that this operator only works on floating-point values; it always returns false for strings.
;floor
;trunc
:Returns the current working value rounded down to the nearest integer. Disassembly of the executable suggests that the operator’s argument is added to the current working value before the rounding is performed.
:The trunc tag isn’t used in any vanilla menus, but its meaning was verified through examining the executable.
;gt
:Returns <code>&amp;true;</code> if the current working value is greater than its value, or <code>&amp;false;</code> otherwise.
;gte
:Returns <code>&amp;true;</code> if the current working value is greater than or equal to its value, or <code>&amp;false;</code> otherwise.
;log
:Computes and returns the base-10 logarithm of the current working value. Disassembly suggests that the operator’s argument is not used.
;ln
:Computes and returns the natural logarithm of the current working value. Disassembly suggests that the operator’s argument is not used.
;lt
:Returns <code>&amp;true;</code> if the current working value is less than the argument, or <code>&amp;false;</code> otherwise.
;lte
:Returns <code>&amp;true;</code> if the current working value is less than or equal to its value, or <code>&amp;false;</code> otherwise.
;max
:Compares the argument to the current working value, and returns whichever value is larger.
;min
:Compares the argument to the current working value, and returns whichever value is smaller.
;mod
:Returns the current working value modulo the operator’s argument.
;mul
;mult
:Multiplies the current working value by the argument, and returns the result.
;neq
:Returns <code>&amp;true;</code> if the current working value is not equal to the argument, or <code>&amp;false;</code> otherwise.
;not
:Casts the argument to a Boolean, inverts it, and returns the result.
;onlyif
:Returns the current working value if the operator’s argument evaluates to <code>&amp;true;</code>, or zero otherwise.
;onlyifnot
:Returns the current working value if the operator’s argument evaluates to <code>&amp;false;</code>, or zero otherwise.
;or
:Returns <code>&amp;true;</code> if one or both of the current working value and the operator’s argument evaluate to <code>&amp;true;</code>.
;rand
:Sets the current working value to a random integer between 1 and the operator’s argument, inclusive.
;ref
:This operator generally does nothing, and is completely ignored. It is only handled by [[Oblivion XML Reference/Traits#Keyboard navigation handling|keyboard navigation]].
;sub
:Subtracts the argument from the current working value, and returns the result.
Anonymous user

Navigation menu