FloatingLong
Link to 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
Link to 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.
ZenScript Copyimport mods.mekanism.api.FloatingLong;
Static Methods
Link to static-methods
Name: create
Creates a FloatingLong representing the given double.
Return Type: FloatingLong
ZenScript CopyFloatingLong.create(value as double) as FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter value | Type double | Description Double to convert |
Name: create
Creates a FloatingLong representing the given long.
Return Type: FloatingLong
ZenScript CopyFloatingLong.create(value as long) as FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter value | Type long | Description Long to convert |
Name: create
Creates a FloatingLong representing the given string representation.
Return Type: FloatingLong
ZenScript CopyFloatingLong.create(value as string) as FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter value | Type string | Description String to parse |
Name: createFromUnsigned
Creates a FloatingLong representing the given unsigned long.
Return Type: FloatingLong
ZenScript CopyFloatingLong.createFromUnsigned(value as long) as FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter value | Type long | Description Unsigned long to convert |
Casters
Link to casters
Result type | Is Implicit |
---|---|
Result type string | Is Implicit true |
Methods
Link to methods
Name: add
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
ZenScript CopyFloatingLong.add(toAdd as FloatingLong) as FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter toAdd | Type FloatingLong | Description The FloatingLong to add. |
Name: asString
Converts this floating long to a string
Return Type: string
ZenScript Copy// FloatingLong.asString() as string
myFloatingLong.asString();
Name: compareTo
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
ZenScript CopyFloatingLong.compareTo(toCompare as FloatingLong) as int
Parameter | Type | Description |
---|---|---|
Parameter toCompare | Type FloatingLong | Description The FloatingLong to compare to. |
Name: divide
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
ZenScript CopyFloatingLong.divide(toDivide as FloatingLong) as FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter toDivide | Type FloatingLong | Description The FloatingLong to divide by. |
Name: isEqual
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
ZenScript CopyFloatingLong.isEqual(toCompare as FloatingLong) as boolean
Parameter | Type | Description |
---|---|---|
Parameter toCompare | Type FloatingLong | Description The FloatingLong to compare to. |
Name: multiply
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
ZenScript CopyFloatingLong.multiply(toMultiply as FloatingLong) as FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter toMultiply | Type FloatingLong | Description The FloatingLong to multiply by. |
Name: subtract
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
ZenScript CopyFloatingLong.subtract(toSubtract as FloatingLong) as FloatingLong
Parameter | Type | Description |
---|---|---|
Parameter toSubtract | Type FloatingLong | Description The FloatingLong to subtract. |
Operators
Link to operators
Name: SUB
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.
ZenScriptCopyfloatingLongOne - floatingLongTwo
Name: ADD
Adds the given FloatingLong to this FloatingLong and returns the result in a new object.
ZenScriptCopyfloatingLongOne + floatingLongTwo
Name: MUL
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.
ZenScriptCopyfloatingLongOne * floatingLongTwo
Name: divide
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.
ZenScriptCopyfloatingLongOne / floatingLongTwo
Name: isEqual
Checks if this FloatingLong is equal to the given FloatingLong.
ZenScriptCopyfloatingLongOne == floatingLongTwo
"name" property missing from group!
Provided: {"COMPARE":""}