All Bundles

Int

Integer class represents an operating system long value

Derived from: Number

Operations

Abs

Returns the absolute value

function : Abs() ~ Int
Return
TypeDescription
Intabsolute value

Clamp

Returns a given value between an upper and lower bound

function : Clamp(min:Int, value:Int, max:Int) ~ Int
Parameters
NameTypeDescription
minIntminimal value
valueIntvalue between the min and max
maxIntmaximum value

Return
TypeDescription
Intmin if vaule is less than main, max if max is less than value, otherwise the value

Clear

Set all array elements to zero

function : Clear(a:Int[]) ~ Nil
Parameters
NameTypeDescription
aInt[]array

Compare

Compares two values

function : native : Compare(l:Int, r:Int) ~ Int
Parameters
NameTypeDescription
lIntleft compare object
rIntright compare object

Return
TypeDescription
Int0 if equal, -1 if types differ, 1 if equal

Error

Prints error value

function : Error() ~ Nil

ErrorLine

Prints error value with newline

function : ErrorLine() ~ Nil

IsNeg

Checks is a number is negative

function : IsNeg() ~ Bool
Return
TypeDescription
Booltrue if negative, false otherwise

Max

Returns the largest integer value

function : native : Max(l:Int, r:Int) ~ Int
Parameters
NameTypeDescription
lIntvalue to compare
rIntvalue to compare

Return
TypeDescription
Intlargest integer value

MaxSize

Returns the maximum size of an integer

function : MaxSize() ~ Int
Return
TypeDescription
Intmaximum size of an integer

Min

Returns the smallest integer value

function : native : Min(l:Int, r:Int) ~ Int
Parameters
NameTypeDescription
lIntvalue to compare
rIntvalue to compare

Return
TypeDescription
Intsmallest integer value

MinSize

Returns the minimum size of an integer

function : MinSize() ~ Int
Return
TypeDescription
Intmaximum size of an integer

Pow

Calculates the power value

function : Pow(b:Int, r:Int) ~ Int
Parameters
NameTypeDescription
bIntpower base
rIntpower to raise

Return
TypeDescription
Intpseudo power value

Calculates the power value

function : Pow(b:Int, r:Float) ~ Float
Parameters
NameTypeDescription
bIntpower base
rFloatpower to raise

Return
TypeDescription
Floatpseudo power value

Print

Prints value

function : Print() ~ Nil

PrintLine

Prints value with newline

function : PrintLine() ~ Nil

Prints values

function : native : PrintLine(v:Int[]) ~ Nil
Parameters
NameTypeDescription
vInt[]values to print

Prints values

function : native : PrintLine(v:Int[,]) ~ Nil
Parameters
NameTypeDescription
vInt[,]values to print

Random

Returns a random number within the given range

function : Random(min:Int, max:Int) ~ Int
Parameters
NameTypeDescription
minIntminimal value
maxIntmax value

Return
TypeDescription
Intrandom number within range

Returns a random number between 0 and max value

function : Random(max:Int) ~ Int
Parameters
NameTypeDescription
maxIntmax value

Return
TypeDescription
Intrandom number within range

Sqrt

Calculates the natural log value

function : Sqrt() ~ Int
Return
TypeDescription
Intnatural log value

ToBinaryString

Returns the binary string value

function : native : ToBinaryString() ~ String
Return
TypeDescription
Stringbinary string value

ToByte

Returns the Byte value

function : ToByte() ~ Byte
Return
TypeDescription
Bytevalue

ToChar

Returns the Character value

function : ToChar() ~ Char
Return
TypeDescription
Charvalue

ToCommaString

Returns a comma formatted string value

function : native : ToCommaString() ~ String
Return
TypeDescription
Stringstring value

ToFloat

Returns the Float value

function : ToFloat() ~ Float
Return
TypeDescription
Floatvalue

ToHexString

Returns the hex string value

function : native : ToHexString() ~ String
Return
TypeDescription
Stringhex string value

ToString

Returns the string value

function : ToString() ~ String
Return
TypeDescription
Stringstring value

Returns a string representation of the value

function : native : ToString() ~ String
Return
TypeDescription
Stringstring representation of the value

Returns a string representation of the int array

function : ToString(v:Int[,]) ~ String
Parameters
NameTypeDescription
vInt[,]int array

Return
TypeDescription
Stringstring representation of the int array