Uint32
Utilities for working with the Uint32 type.
Edit on GitHubAdded in 0.6.0
No other changes yet.
from "uint32" include Uint32
Functions and constants included in the Uint32 module.
Added in 0.6.0
No other changes yet.
fromNumber : (number: Number) => Uint32
Converts a Number to a Uint32.
Parameters:
| param | type | description |
|---|---|---|
number | Number | The value to convert |
number: The value to convertReturns:
| type | description |
|---|---|
Uint32 | The Number represented as a Uint32 |
Uint32: The Number represented as a Uint32Added in 0.6.0
No other changes yet.
toNumber : (value: Uint32) => Number
Converts a Uint32 to a Number.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to convert |
value: The value to convertReturns:
| type | description |
|---|---|
Number | The Uint32 represented as a Number |
Number: The Uint32 represented as a NumberAdded in 0.6.0
No other changes yet.
fromInt32 : (number: Int32) => Uint32
Converts an Int32 to a Uint32.
Parameters:
| param | type | description |
|---|---|---|
number | Int32 | The value to convert |
number: The value to convertReturns:
| type | description |
|---|---|
Uint32 | The Int32 represented as a Uint32 |
Uint32: The Int32 represented as a Uint32Added in 0.6.0
No other changes yet.
incr : (value: Uint32) => Uint32
Increments the value by one.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to increment |
value: The value to incrementReturns:
| type | description |
|---|---|
Uint32 | The incremented value |
Uint32: The incremented valueAdded in 0.6.0
No other changes yet.
decr : (value: Uint32) => Uint32
Decrements the value by one.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to decrement |
value: The value to decrementReturns:
| type | description |
|---|---|
Uint32 | The decremented value |
Uint32: The decremented valueAdded in 0.6.0
No other changes yet.
(+) : (x: Uint32, y: Uint32) => Uint32
Computes the sum of its operands.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first operand |
y | Uint32 | The second operand |
x: The first operandy: The second operandReturns:
| type | description |
|---|---|
Uint32 | The sum of the two operands |
Uint32: The sum of the two operandsAdded in 0.6.0
No other changes yet.
(-) : (x: Uint32, y: Uint32) => Uint32
Computes the difference of its operands.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first operand |
y | Uint32 | The second operand |
x: The first operandy: The second operandReturns:
| type | description |
|---|---|
Uint32 | The difference of the two operands |
Uint32: The difference of the two operandsAdded in 0.6.0
No other changes yet.
(*) : (x: Uint32, y: Uint32) => Uint32
Computes the product of its operands.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first operand |
y | Uint32 | The second operand |
x: The first operandy: The second operandReturns:
| type | description |
|---|---|
Uint32 | The product of the two operands |
Uint32: The product of the two operandsAdded in 0.6.0
No other changes yet.
(/) : (x: Uint32, y: Uint32) => Uint32
Computes the quotient of its operands.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first operand |
y | Uint32 | The second operand |
x: The first operandy: The second operandReturns:
| type | description |
|---|---|
Uint32 | The quotient of its operands |
Uint32: The quotient of its operandsAdded in 0.6.0
No other changes yet.
rem : (x: Uint32, y: Uint32) => Uint32
Computes the remainder of the division of its operands.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first operand |
y | Uint32 | The second operand |
x: The first operandy: The second operandReturns:
| type | description |
|---|---|
Uint32 | The remainder of its operands |
Uint32: The remainder of its operandsAdded in 0.6.0
No other changes yet.
rotl : (value: Uint32, amount: Uint32) => Uint32
Rotates the bits of the value left by the given number of bits.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to rotate |
amount | Uint32 | The number of bits to rotate by |
value: The value to rotateamount: The number of bits to rotate byReturns:
| type | description |
|---|---|
Uint32 | The rotated value |
Uint32: The rotated valueAdded in 0.6.0
No other changes yet.
rotr : (value: Uint32, amount: Uint32) => Uint32
Rotates the bits of the value right by the given number of bits.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to rotate |
amount | Uint32 | The number of bits to rotate by |
value: The value to rotateamount: The number of bits to rotate byReturns:
| type | description |
|---|---|
Uint32 | The rotated value |
Uint32: The rotated valueAdded in 0.6.0
No other changes yet.
(<<) : (value: Uint32, amount: Uint32) => Uint32
Shifts the bits of the value left by the given number of bits.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to shift |
amount | Uint32 | The number of bits to shift by |
value: The value to shiftamount: The number of bits to shift byReturns:
| type | description |
|---|---|
Uint32 | The shifted value |
Uint32: The shifted valueAdded in 0.6.0
No other changes yet.
(>>>) : (value: Uint32, amount: Uint32) => Uint32
Shifts the bits of the value right by the given number of bits.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to shift |
amount | Uint32 | The amount to shift by |
value: The value to shiftamount: The amount to shift byReturns:
| type | description |
|---|---|
Uint32 | The shifted value |
Uint32: The shifted valueAdded in 0.6.0
No other changes yet.
(==) : (x: Uint32, y: Uint32) => Bool
Checks if the first value is equal to the second value.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first value |
y | Uint32 | The second value |
x: The first valuey: The second valueReturns:
| type | description |
|---|---|
Bool | true if the first value is equal to the second value or false otherwise |
Bool: true if the first value is equal to the second value or false otherwiseAdded in 0.6.0
No other changes yet.
(!=) : (x: Uint32, y: Uint32) => Bool
Checks if the first value is not equal to the second value.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first value |
y | Uint32 | The second value |
x: The first valuey: The second valueReturns:
| type | description |
|---|---|
Bool | true if the first value is not equal to the second value or false otherwise |
Bool: true if the first value is not equal to the second value or false otherwiseAdded in 0.6.0
No other changes yet.
eqz : (value: Uint32) => Bool
Checks if the given value is equal to zero.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to inspect |
value: The value to inspectReturns:
| type | description |
|---|---|
Bool | true if the first value is equal to zero or false otherwise |
Bool: true if the first value is equal to zero or false otherwiseAdded in 0.6.0
No other changes yet.
(<) : (x: Uint32, y: Uint32) => Bool
Checks if the first value is less than the second value.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first value |
y | Uint32 | The second value |
x: The first valuey: The second valueReturns:
| type | description |
|---|---|
Bool | true if the first value is less than the second value or false otherwise |
Bool: true if the first value is less than the second value or false otherwiseAdded in 0.6.0
No other changes yet.
(>) : (x: Uint32, y: Uint32) => Bool
Checks if the first value is greater than the second value.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first value |
y | Uint32 | The second value |
x: The first valuey: The second valueReturns:
| type | description |
|---|---|
Bool | true if the first value is greater than the second value or false otherwise |
Bool: true if the first value is greater than the second value or false otherwiseAdded in 0.6.0
No other changes yet.
(<=) : (x: Uint32, y: Uint32) => Bool
Checks if the first value is less than or equal to the second value.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first value |
y | Uint32 | The second value |
x: The first valuey: The second valueReturns:
| type | description |
|---|---|
Bool | true if the first value is less than or equal to the second value or false otherwise |
Bool: true if the first value is less than or equal to the second value or false otherwiseAdded in 0.6.0
No other changes yet.
(>=) : (x: Uint32, y: Uint32) => Bool
Checks if the first value is greater than or equal to the second value.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first value |
y | Uint32 | The second value |
x: The first valuey: The second valueReturns:
| type | description |
|---|---|
Bool | true if the first value is greater than or equal to the second value or false otherwise |
Bool: true if the first value is greater than or equal to the second value or false otherwiseAdded in 0.6.0
No other changes yet.
lnot : (value: Uint32) => Uint32
Computes the bitwise NOT of the given value.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The given value |
value: The given valueReturns:
| type | description |
|---|---|
Uint32 | Containing the inverted bits of the given value |
Uint32: Containing the inverted bits of the given valueAdded in 0.6.0
No other changes yet.
(&) : (x: Uint32, y: Uint32) => Uint32
Computes the bitwise AND (&) on the given operands.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first operand |
y | Uint32 | The second operand |
x: The first operandy: The second operandReturns:
| type | description |
|---|---|
Uint32 | Containing a 1 in each bit position for which the corresponding bits of both operands are 1 |
Uint32: Containing a 1 in each bit position for which the corresponding bits of both operands are 1Added in 0.6.0
No other changes yet.
(|) : (x: Uint32, y: Uint32) => Uint32
Computes the bitwise OR (|) on the given operands.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first operand |
y | Uint32 | The second operand |
x: The first operandy: The second operandReturns:
| type | description |
|---|---|
Uint32 | Containing a 1 in each bit position for which the corresponding bits of either or both operands are 1 |
Uint32: Containing a 1 in each bit position for which the corresponding bits of either or both operands are 1Added in 0.6.0
No other changes yet.
(^) : (x: Uint32, y: Uint32) => Uint32
Computes the bitwise XOR (^) on the given operands.
Parameters:
| param | type | description |
|---|---|---|
x | Uint32 | The first operand |
y | Uint32 | The second operand |
x: The first operandy: The second operandReturns:
| type | description |
|---|---|
Uint32 | Containing a 1 in each bit position for which the corresponding bits of either but not both operands are 1 |
Uint32: Containing a 1 in each bit position for which the corresponding bits of either but not both operands are 1Added in 0.6.0
No other changes yet.
clz : (value: Uint32) => Uint32
Counts the number of leading zero bits in the value.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to inspect |
value: The value to inspectReturns:
| type | description |
|---|---|
Uint32 | The amount of leading zeros |
Uint32: The amount of leading zerosAdded in 0.6.0
No other changes yet.
ctz : (value: Uint32) => Uint32
Counts the number of trailing zero bits in the value.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to inspect |
value: The value to inspectReturns:
| type | description |
|---|---|
Uint32 | The amount of trailing zeros |
Uint32: The amount of trailing zerosAdded in 0.6.0
No other changes yet.
popcnt : (value: Uint32) => Uint32
Counts the number of bits set to 1 in the value, also known as a population count.
Parameters:
| param | type | description |
|---|---|---|
value | Uint32 | The value to inspect |
value: The value to inspectReturns:
| type | description |
|---|---|
Uint32 | The amount of 1-bits in its operand |
Uint32: The amount of 1-bits in its operand