All Bundles

Float

Float class represents a double-precision floating-point value

Derived from: Number

Operations

Abs

Returns the absolute value

function : Abs() ~ Float
Return
TypeDescription
Floatabsolute value

ArcCos

Calculates the cosine value

function : ArcCos() ~ Float
Return
TypeDescription
Floatcosine value

ArcCosh

Calculates the arc-hyperbolic cosine

function : ArcCosh() ~ Float
Return
TypeDescription
Floathyperbolic arc-cosine value

ArcSin

Calculates the arc-sine value

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

ArcSinh

Calculates the arc-hyperbolic sine

function : ArcSinh() ~ Float
Return
TypeDescription
Floathyperbolic arc-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

ArcTanh

Calculates the arc-hyperbolic tangent

function : ArcTanh() ~ Float
Return
TypeDescription
Floathyperbolic arc-tangent value

Cbrt

Calculates the cubic root

function : Cbrt() ~ Float
Return
TypeDescription
Floatcubic root

Ceil

Calculates the ceiling value

function : Ceil() ~ 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 : 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

Cosh

Calculates the hyperbolic cosine

function : Cosh() ~ Float
Return
TypeDescription
Floathyperbolic cosine 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

Exp

Calculates exponential value

function : Exp() ~ Float
Return
TypeDescription
Floatexponential 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

Inf

Returns a positive infinity value

function : Inf() ~ Float
Return
TypeDescription
Floatpositive infinity 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

Log10

Calculates the common (base-10) logarithm value

function : Log10() ~ Float
Return
TypeDescription
Floatcommon (base-10) logarithm value

Log2

Calculates the binary logarithm

function : Log2() ~ Float
Return
TypeDescription
Floatbinary logarithm

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

NaN

Returns a NaN value

function : NaN() ~ Float
Return
TypeDescription
FloatNaN value

NegInf

Returns a negative infinity value

function : NegInf() ~ Float
Return
TypeDescription
Floatnegative infinity value

Pi

Value of Pi

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

Pow

Calculates the power value

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

Return
TypeDescription
Floatpseudo power value

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

Prints values

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

Prints values

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

Random

Returns a pseudo random value between 0.0 and 1.0

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

Returns a pseudo random value between 0.0 and 1.0

function : Random(range_start:Float, range_end:Float) ~ Float
Parameters
NameTypeDescription
range_startFloatminimum value
range_endFloatmaximum value

Return
TypeDescription
Floatpseudo random value

Round

Rounds the value

function : Round() ~ Float
Return
TypeDescription
Floatrounded value

Sign

Returns the sign of a number

function : Sign() ~ Float
Return
TypeDescription
Floatsign of a number

Sin

Calculates the sine value

function : Sin() ~ Float
Return
TypeDescription
Floatsine value

Sinh

Calculates the hyperbolic sine

function : Sinh() ~ Float
Return
TypeDescription
Floathyperbolic sine value

Sqrt

Calculates the square root value

function : Sqrt() ~ Float
Return
TypeDescription
Floatsquare root value

Tan

Calculates the tangent value

function : Tan() ~ Float
Return
TypeDescription
Floattangent value

Tanh

Calculates the hyperbolic tangent

function : Tanh() ~ Float
Return
TypeDescription
Floathyperbolic tangent 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

Returns a string representation of the float array

function : ToString(v:Float[,]) ~ String
Parameters
NameTypeDescription
vFloat[,]float array

Return
TypeDescription
Stringstring representation of the float array

Trunc

Truncates the value

function : Trunc() ~ Float
Return
TypeDescription
Floattruncated value