Int
Integer class represents an operating system long value
Operations
- Abs
- Cbrt
- Clamp
- Clear
- Compare
- DoubleFactorial
- Error
- ErrorLine
- Factorial
- Inf
- IsNeg
- Max
- MaxSize
- Min
- MinSize
- NaN
- NegInf
- Pow
- PrintLine
- Random
- Sign
- Sqrt
- ToBinaryString
- ToByte
- ToChar
- ToCommaString
- ToFloat
- ToHexString
- ToString
Clamp
Returns a given value between an upper and lower bound
function : Clamp(min:Int, value:Int, max:Int) ~ Int
Parameters
Name | Type | Description |
---|---|---|
min | Int | minimal value |
value | Int | value between the min and max |
max | Int | maximum value |
Return
Type | Description |
---|---|
Int | min 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
Name | Type | Description |
---|---|---|
a | Int | array |
Compare
Compares two values
function : native : Compare(l:Int, r:Int) ~ Int
Parameters
Name | Type | Description |
---|---|---|
l | Int | left compare object |
r | Int | right compare object |
Return
Type | Description |
---|---|
Int | 0 if equal, -1 if types differ, 1 if equal |
DoubleFactorial
Calculates the double factorial of the value
function : native : DoubleFactorial(n:Int) ~ Int
Parameters
Name | Type | Description |
---|---|---|
n | Int | number |
Return
Type | Description |
---|---|
Int | double factorial of the value |
Factorial
Calculates the factorial of the value
function : native : Factorial(n:Int) ~ Int
Parameters
Name | Type | Description |
---|---|---|
n | Int | number |
Return
Type | Description |
---|---|
Int | factorial of the value |
Inf
Returns a positive infinity value
function : Inf() ~ Int
Return
Type | Description |
---|---|
Int | positive infinity value |
IsNeg
Checks is a number is negative
function : IsNeg() ~ Bool
Return
Type | Description |
---|---|
Bool | true if negative, false otherwise |
Max
Returns the largest integer value
function : native : Max(l:Int, r:Int) ~ Int
Parameters
Name | Type | Description |
---|---|---|
l | Int | value to compare |
r | Int | value to compare |
Return
Type | Description |
---|---|
Int | largest integer value |
MaxSize
Returns the maximum size of an integer
function : MaxSize() ~ Int
Return
Type | Description |
---|---|
Int | maximum size of an integer |
Min
Returns the smallest integer value
function : native : Min(l:Int, r:Int) ~ Int
Parameters
Name | Type | Description |
---|---|---|
l | Int | value to compare |
r | Int | value to compare |
Return
Type | Description |
---|---|
Int | smallest integer value |
MinSize
Returns the minimum size of an integer
function : MinSize() ~ Int
Return
Type | Description |
---|---|
Int | maximum size of an integer |
NegInf
Returns a negative infinity value
function : NegInf() ~ Int
Return
Type | Description |
---|---|
Int | negative infinity value |
Pow
Calculates the power value
function : Pow(b:Int, r:Int) ~ Int
Parameters
Name | Type | Description |
---|---|---|
b | Int | power base |
r | Int | power to raise |
Return
Type | Description |
---|---|
Int | pseudo power value |
Pow
Calculates the power value
function : Pow(b:Int, r:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
b | Int | power base |
r | Float | power to raise |
Return
Type | Description |
---|---|
Float | pseudo power value |
PrintLine
Prints values
function : native : PrintLine(v:Int[]) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
v | Int | values to print |
PrintLine
Prints values
function : native : PrintLine(v:Int[,]) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
v | Int | values to print |
Random
Returns a pseudo random value between 0 and 1, inclusive
function : Random(range_start:Int, range_end:Int) ~ Int
Parameters
Name | Type | Description |
---|---|---|
range_start | Int | minimum value |
range_end | Int | maximum value |
Return
Type | Description |
---|---|
Int | pseudo random value |
Random
Returns a random number between 0 and max value, inclusive
function : Random(max:Int) ~ Int
Parameters
Name | Type | Description |
---|---|---|
max | Int | max value |
Return
Type | Description |
---|---|
Int | random number within range |
ToBinaryString
Returns the binary string value
function : native : ToBinaryString() ~ String
Return
Type | Description |
---|---|
String | binary string value |
ToCommaString
Returns a comma formatted string value
function : native : ToCommaString() ~ String
Return
Type | Description |
---|---|
String | string value |
ToHexString
Returns a hex string value
function : native : ToHexString() ~ String
Return
Type | Description |
---|---|
String | hex string value |
ToString
Returns the string value
function : ToString() ~ String
Return
Type | Description |
---|---|
String | string value |
ToString
Returns a string representation of the value
function : native : ToString() ~ String
Return
Type | Description |
---|---|
String | string representation of the value |