RightShift - Math

Revision as of 20:50, 20 April 2017 by imported>Qazaaq (Added F4SE member)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

F4SE Member of: Math Script

Shifts value right by n number of bits.

Syntax

int Function RightShift(int value, int shiftBy) Global Native

Parameters

  • value: The integer that you wish to shift.
  • shiftBy: How many bits to shift to the right.

Return Value

The decimal result of the shift.

Examples

int iA = Math.RightShift(2146, 2) ;iA == 536
int iC = Math.RightShift(0x00802000, 9) ;iC == 16400

See Also