FloatingLong
This class was added by a mod with mod-id mekanism
. So you need to have this mod installed if you
want to use this feature.
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
Static Methods
Creates a FloatingLong representing the given double.
Return Type: FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter value | Type double | Description Double to convert |
Creates a FloatingLong representing the given long.
Return Type: FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter value | Type long | Description Long to convert |
Creates a FloatingLong representing the given string representation.
Return Type: FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter value | Type string | Description String to parse |
Creates a FloatingLong representing the given unsigned long.
Return Type: FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter value | Type long | Description Unsigned long to convert |
Casters
Result type | Is Implicit |
---|---|
Result type string | Is Implicit true |
Methods
Adds the given FloatingLong to this FloatingLong and returns the result in a new object.
This
gets clamped at the upper bound of 18,446,744,073,709,551,615.9999
instead of overflowing.
Returns: The FloatingLong representing the value of adding the given FloatingLong to this FloatingLong.
Return Type: FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter toAdd | Type FloatingLong | Description The FloatingLong to add. |
Converts this floating long to a string
Return Type: string
Compares this FloatingLong to the given FloatingLong.
Returns: 0
if equal to toCompare
An integer< 0
if smaller than toCompare
An integer > 0
if bigger than toCompare
Return Type: int
Parameter | Type | Description |
---|---|---|
Parameter toCompare | Type FloatingLong | Description The FloatingLong to compare to. |
Divides this FloatingLong by the
given FloatingLong and returns the result in a new object. This
gets clamped at the upper bound of 18,446,744,073,709,551,615.9999
instead of overflowing.
Returns: The FloatingLong representing the value of dividing this FloatingLong by the given FloatingLong.
Return Type: FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter toDivide | Type FloatingLong | Description The FloatingLong to divide by. |
Checks if this FloatingLong is equal to the given FloatingLong.
Returns: true
if this FloatingLong is equal to the
given FloatingLong, false
otherwise.
Return Type: boolean
Parameter | Type | Description |
---|---|---|
Parameter toCompare | Type FloatingLong | Description The FloatingLong to compare to. |
Multiplies the given FloatingLong with
this FloatingLong and returns the result in a new object. This
gets clamped at the upper bound of 18,446,744,073,709,551,615.9999
instead of overflowing.
Returns: The FloatingLong representing the value of multiplying the given FloatingLong with this FloatingLong.
Return Type: FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter toMultiply | Type FloatingLong | Description The FloatingLong to multiply by. |
Subtracts the given FloatingLong from this FloatingLong and returns the result in a new object. This gets clamped at the lower bound of 0 rather than becoming negative.
Returns: The FloatingLong representing the value of subtracting the given FloatingLong from this FloatingLong.
Return Type: FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter toSubtract | Type FloatingLong | Description The FloatingLong to subtract. |
Operators
Subtracts the given FloatingLong from this FloatingLong and returns the result in a new object. This gets clamped at the lower bound of 0 rather than becoming negative.
Adds the given FloatingLong to this FloatingLong and returns the result in a new object.
Multiplies the given FloatingLong with
this FloatingLong and returns the result in a new object. This
gets clamped at the upper bound of 18,446,744,073,709,551,615.9999
instead of overflowing.
Divides this FloatingLong by the
given FloatingLong and returns the result in a new object. This
gets clamped at the upper bound of 18,446,744,073,709,551,615.9999
instead of overflowing.
Checks if this FloatingLong is equal to the given FloatingLong.
Compares this FloatingLong to the given FloatingLong.