Browse docsmath.shift_right
On this page
API method

math.shift_right

Shifts an unsigned 32-bit value right by amount bits, filling with zeros.

Syntax

Atlas Script
math.shift_right(value, amount)

Parameters

value
Value written, converted, or evaluated by this method. Its required type and range are described in Remarks.
amount
Number of bit positions to shift. Only the low five bits are used, so the shift is 0 through 31.

Return value

See the remarks for the returned value and runtime behavior.

Remarks

Shifts an unsigned 32-bit value right by amount bits, filling with zeros. Only the low five bits of amount are used, so the shift is 0-31.

Examples

Usage pattern
// Replace value, amount with values described above.
math.shift_right(value, amount);
Reference details are generated from the Atlas Script schema in this documentation source snapshot. Confirm release-specific behavior in the Atlas for Windows build you use.