nupp.math.i32
Signed 32-bit wrapping arithmetic.
Module contents
Functions
| Function | Kind | Description |
|---|---|---|
add | function | |
andBits | function | |
fromU32 | function | |
lessOrEqual | function | |
lessThan | function | |
mul | function | |
notBits | function | |
orBits | function | |
rotateLeft | function | |
rotateRight | function | |
shiftLeft | function | |
shiftRightArithmetic | function | |
sub | function | |
toU32 | function | |
wrap | function | |
xorBits | function |
Functions#
addfunction#
Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
b | int32 |
Returns
| Type | Description |
|---|---|
int32 |
andBitsfunction#
Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
b | int32 |
Returns
| Type | Description |
|---|---|
int32 |
fromU32function#
Arguments
| Name | Type | Description |
|---|---|---|
a | uint32 |
Returns
| Type | Description |
|---|---|
int32 |
lessOrEqualfunction#
local lessOrEqual: function(a: int32, b: int32): booleanArguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
b | int32 |
Returns
| Type | Description |
|---|---|
boolean |
lessThanfunction#
Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
b | int32 |
Returns
| Type | Description |
|---|---|
boolean |
mulfunction#
Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
b | int32 |
Returns
| Type | Description |
|---|---|
int32 |
notBitsfunction#
Arguments
| Name | Type | Description |
|---|---|---|
a | int32 |
Returns
| Type | Description |
|---|---|
int32 |
orBitsfunction#
Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
b | int32 |
Returns
| Type | Description |
|---|---|
int32 |
rotateLeftfunction#
local rotateLeft: function(a: int32, count: integer): int32Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
count | integer |
Returns
| Type | Description |
|---|---|
int32 |
rotateRightfunction#
local rotateRight: function(a: int32, count: integer): int32Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
count | integer |
Returns
| Type | Description |
|---|---|
int32 |
shiftLeftfunction#
Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
count | integer |
Returns
| Type | Description |
|---|---|
int32 |
shiftRightArithmeticfunction#
local shiftRightArithmetic: function(a: int32, count: integer): int32Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
count | integer |
Returns
| Type | Description |
|---|---|
int32 |
subfunction#
Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
b | int32 |
Returns
| Type | Description |
|---|---|
int32 |
toU32function#
Arguments
| Name | Type | Description |
|---|---|---|
a | int32 |
Returns
| Type | Description |
|---|---|
uint32 |
wrapfunction#
Arguments
| Name | Type | Description |
|---|---|---|
value | integer |
Returns
| Type | Description |
|---|---|
int32 |
xorBitsfunction#
Arguments
| Name | Type | Description |
|---|---|---|
a | int32 | |
b | int32 |
Returns
| Type | Description |
|---|---|
int32 |