Go to Page... |
Compatibility: | Endless Archive (9.2.5) |
Updated: | 02/05/24 05:50 AM |
Created: | 01/31/24 10:33 AM |
Monthly downloads: | 891 |
Total downloads: | 3,794 |
Favorites: | 2 |
MD5: |
-- 1: local <Int> num = sbyte(<number/string/hex> value) -- works with all supported types -- 2: local <Int> num = Int8(<number/string/hex> value) -- works with all supported types -- 3: local <Int> num = Int:new(<positive number> bits, <boolean> isSigned, <number/string/hex> value) -- 4: local <Int> num = Int:fromArray(<table> bitArray, <boolean> isSigned)
local <Int> resultInt = int(<number/string/hex> value)-- this returns the Int object local <number> value = resultInt:GetValue() -- this returns the number value of the object
local <Int> value1 = int(<number/string/hex> value1) local <Int> value2 = int(<number/string/hex> value2) -- Addition: local <Int> result = value1:Add(value2) -- Subtraction: local <Int> result = value1:Sub(value2) -- Multiplication: local <Int> result = value1:Mul(value2) -- Division: local <Int> result = value1:Div(value2) -- Increase by 1: local <Int> result = value1:Increase() -- Decrease by 1: local <Int> result = value1:Decrease() -- Increase by 1: local <Int> result = value1:Increase() -- Get the absolute value: local <Int> result = value1:Abs() -- Get the negative value: local <Int> result = value1:Neg()
local <Int> value1 = int(<number/string/hex> value1) local <Int> value2 = int(<number/string/hex> value2) -- check if value is 0 local <boolean> result = value1:IsNull() -- check if value is a negative signed number local <boolean> result = value1:IsSignedNegative() -- check if value1 is smaller than value2 local <boolean> result = value1:IsSmallerThan(value2) -- check if value1 is greater than value2 local <boolean> result = value1:IsGreaterThan(value2) -- check if value1 is equal to value2 local <boolean> result = value1:IsEqualTo(value2)
local <Int> value = int(<number/string/hex> value) -- signed to unsigned local <Int> result = value:ToUnsigned() -- unsigned to signed local <Int> result = value:ToSigned() -- copy the value without object reference local <Int> result = value:Copy() -- create a new value (default 0) with the same type local <Int> result = value:CopyType(<number/string/hex/nil> optionalValue) -- set value to the maximum value local <Int> result = value:ToMaxValue() -- set value to the minimum value local <Int> result = value:ToMinValue()
local <Int> value1 = int(<number/string/hex> value1) local <Int> value2 = int(<number/string/hex> value2) -- Rshift: -- uses the standard shift for signed (arithmetic shift)/unsigned (logical shift) numbers local <Int> result = value1:Rshift(<positive number> shifts) -- Lshift: -- uses the standard shift for signed (arithmetic shift)/unsigned (logical shift) numbers local <Int> result = value1:Lshift(<positive number> shifts) -- LogicalRshift: local <Int> result = value1:LogicalRshift(<positive number> shifts) -- LogicalLshift: local <Int> result = value1:LogicalLshift(<positive number> shifts) -- ArithmeticRshift: local <Int> result = value1:ArithmeticRshift(<positive number> shifts) -- ArithmeticLshift: local <Int> result = value1:ArithmeticLshift(<positive number> shifts) -- CircularRshift: local <Int> result = value1:CircularRshift(<positive number> shifts) -- CircularLshift: local <Int> result = value1:CircularLshift(<positive number> shifts) -- And: local <Int> result = value1:And(value2) -- Or: local <Int> result = value1:Or(value2) -- Xor: local <Int> result = value1:Xor(value2) -- Not: local <Int> result = value1:Not()
File Name |
Version |
Size |
Uploader |
Date |
1.0 |
8kB |
akamatsu02 |
01/31/24 10:39 AM |
There have been no comments posted to this file.
Be the first to add one. |