All Bundles

Float

Float class represents a double-precision floating-point value

Derived from: Number

Operations

Abs

Returns the absolute value

function : native : Abs() ~ Float
Return
TypeDescription
Floatabsolute value

ArcCos

Calculates the cosine value

function : ArcCos() ~ Float
Return
TypeDescription
Floatcosine value

ArcSin

Calculates the arc-sine value

function : ArcSin() ~ Float
Return
TypeDescription
Floatarc-sine value

ArcTan

Calculates the arc-tangent value

function : ArcTan() ~ Float
Return
TypeDescription
Floatarc-tangent value

ArcTan2

Calculates arc tangent of y/x

function : ArcTan2(y:Float, x:Float) ~ Float
Parameters
NameTypeDescription
yFloatvalue
xFloatvalue

Return
TypeDescription
Floatarc-tangent value

Ceiling

Calculates the ceiling value

function : Ceiling() ~ Float
Return
TypeDescription
Floatceiling value

Clamp

Returns a given value between an upper and lower bound

function : Clamp(min:Float, value:Float, max:Float) ~ Float
Parameters
NameTypeDescription
minFloatminimal value
valueFloatvalue between the min and max
maxFloatmaximum value

Return
TypeDescription
Floatmin 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(f:Float[]) ~ Nil
Parameters
NameTypeDescription
fFloat[]array

Compare

Compares two value

function : native : Compare(l:Float, r:Float) ~ Int
Parameters
NameTypeDescription
lFloatleft compare object
rFloatright compare object

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

Cos

Calculates the cosine value

function : Cos() ~ Float
Return
TypeDescription
Floatcosine value

DoubleFactorial

Calculates the double factorial of the value

function : native : DoubleFactorial() ~ Float
Parameters
NameTypeDescription

Return
TypeDescription
Floatdouble factorial of the value

E

Value of E

function : E() ~ Float
Return
TypeDescription
Floatvalue of E

Error

Prints error value

function : Error() ~ Nil

ErrorLine

Prints error value with newline

function : ErrorLine() ~ Nil

Factorial

Calculates the factorial value

function : Factorial() ~ Float
Parameters
NameTypeDescription

Return
TypeDescription
Floatfactorial value

Floor

Calculates the floor value

function : Floor() ~ Float
Return
TypeDescription
Floatfloor value

Gamma

Calculates the gamma value

function : Gamma() ~ Float
Parameters
NameTypeDescription

Return
TypeDescription
Floatgamma value

IsNeg

Checks is a number is negative

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

Log

Calculates the log value

function : Log() ~ Float
Return
TypeDescription
Floatlog value

Max

Returns the largest float value

function : native : Max(l:Float, r:Float) ~ Float
Parameters
NameTypeDescription
lFloatvalue to compare
rFloatvalue to compare

Return
TypeDescription
Floatlargest float value

Min

Returns the smallest float value

function : native : Min(r:Float) ~ Float
Parameters
NameTypeDescription
rFloatvalue to compare

Return
TypeDescription
Floatsmallest float value

Mod

Calculates the decimal mod

function : Mod(a:Float, b:Float) ~ Float
Parameters
NameTypeDescription
aFloatvalue
bFloatvalue

Return
TypeDescription
Floatdecimial mod

Pi

Value of Pi

function : Pi() ~ Float
Return
TypeDescription
Floatvalue of Pi

Pow

Calculates the power value

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

Return
TypeDescription
Floatpseudo power value

Print

Prints value

function : Print() ~ Nil

PrintLine

Prints value with newline

function : PrintLine() ~ Nil

Random

Returns a pseudo random value between 0.0 and 1.0

function : Random() ~ Float
Return
TypeDescription
Floatpseudo random value

Sin

Calculates the sine value

function : Sin() ~ Float
Return
TypeDescription
Floatsine value

Sqrt

Calculates the natural log value

function : Sqrt() ~ Float
Return
TypeDescription
Floatnatural log value

Tan

Calculates the tangent value

function : Tan() ~ Float
Return
TypeDescription
Floattangent value

ToByte

Returns the Character value

function : ToByte() ~ Byte
Return
TypeDescription
Bytevalue

ToChar

Returns the Int value

function : ToChar() ~ Char
Return
TypeDescription
Charvalue

ToDegrees

Converts the value into degrees

function : ToDegrees() ~ Float
Return
TypeDescription
Floatdegree value

ToInt

Returns the Int value

function : ToInt() ~ Int
Return
TypeDescription
Intvalue

ToRadians

Converts the value into radians

function : ToRadians() ~ Float
Return
TypeDescription
Floatradian value

ToString

Returns a string representation of the value

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