Difference between revisions of "LogicalAnd - Math"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Bot Owned
(Created page with "Category:Scripting Category:Papyrus Category:SKSE '''SKSE Member of:''' Math Script ANDs arg1 and arg2. == Syntax == <source lang="papyrus"> int Function Log...")
 
imported>Foxox
(Important information about behavior of this function)
 
Line 4: Line 4:
'''SKSE Member of:''' [[Math Script]]
'''SKSE Member of:''' [[Math Script]]


ANDs arg1 and arg2.
Bitwise ANDs arg1 and arg2.
 
Despite being named "Logical", this function performs a bitwise operation.
Ordinary [[Operator Reference#Logical Operators|logical operators]] are available in vanilla Papyrus.


== Syntax ==
== Syntax ==

Latest revision as of 17:21, 17 November 2014

SKSE Member of: Math Script

Bitwise ANDs arg1 and arg2.

Despite being named "Logical", this function performs a bitwise operation. Ordinary logical operators are available in vanilla Papyrus.

Syntax[edit | edit source]

int Function LogicalAnd(int arg1, int arg2) global native

Parameters[edit | edit source]

  • arg1: The first value to AND.
  • arg2: The second value to AND.

Return Value[edit | edit source]

The decimal result of the AND.

Examples[edit | edit source]

int iA = Math.LogicalAnd(0x00205D96, 0x0059E50C) ;iA == 4504
int iC = Math.LogicalAnd(6582, 9258) ;iC == 34

See Also[edit | edit source]