Float
Float class represents a double-precision floating-point value
Operations
- Abs
- ArcCos
- ArcCosh
- ArcSin
- ArcSinh
- ArcTan
- ArcTan2
- ArcTanh
- Cbrt
- Ceil
- Clamp
- Clear
- Compare
- Cos
- Cosh
- DoubleFactorial
- E
- Error
- ErrorLine
- Exp
- Factorial
- Floor
- Gamma
- Inf
- IsNeg
- Log
- Log10
- Log2
- Max
- Min
- Mod
- NaN
- NegInf
- Pi
- Pow
- PrintLine
- Random
- Round
- Sign
- Sin
- Sinh
- Sqrt
- Tan
- Tanh
- ToByte
- ToChar
- ToDegrees
- ToInt
- ToRadians
- ToString
- Trunc
ArcCosh
Calculates the arc-hyperbolic cosine
function : ArcCosh() ~ Float
Return
Type | Description |
---|---|
Float | hyperbolic arc-cosine value |
ArcSin
Calculates the arc-sine value
function : ArcSin() ~ Float
Return
Type | Description |
---|---|
Float | arc-sine value |
ArcSinh
Calculates the arc-hyperbolic sine
function : ArcSinh() ~ Float
Return
Type | Description |
---|---|
Float | hyperbolic arc-sine value |
ArcTan
Calculates the arc-tangent value
function : ArcTan() ~ Float
Return
Type | Description |
---|---|
Float | arc-tangent value |
ArcTan2
Calculates arc tangent of y/x
function : ArcTan2(y:Float, x:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
y | Float | value |
x | Float | value |
Return
Type | Description |
---|---|
Float | arc-tangent value |
ArcTanh
Calculates the arc-hyperbolic tangent
function : ArcTanh() ~ Float
Return
Type | Description |
---|---|
Float | hyperbolic arc-tangent value |
Clamp
Returns a given value between an upper and lower bound
function : Clamp(min:Float, value:Float, max:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
min | Float | minimal value |
value | Float | value between the min and max |
max | Float | maximum value |
Return
Type | Description |
---|---|
Float | 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(f:Float[]) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
f | Float | array |
Compare
Compares two value
function : Compare(l:Float, r:Float) ~ Int
Parameters
Name | Type | Description |
---|---|---|
l | Float | left compare object |
r | Float | right compare object |
Return
Type | Description |
---|---|
Int | 0 if equal, -1 if types differ, 1 if equal |
Cosh
Calculates the hyperbolic cosine
function : Cosh() ~ Float
Return
Type | Description |
---|---|
Float | hyperbolic cosine value |
DoubleFactorial
Calculates the double factorial of the value
function : native : DoubleFactorial(n:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
n | Float | number |
Return
Type | Description |
---|---|
Float | double factorial of the value |
Factorial
Calculates the factorial value
function : Factorial(n:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
n | Float | number |
Return
Type | Description |
---|---|
Float | factorial value |
Gamma
Calculates the gamma value
function : Gamma() ~ Float
Parameters
Name | Type | Description |
---|---|---|
Return
Type | Description |
---|---|
Float | gamma value |
Inf
Returns a positive infinity value
function : Inf() ~ Float
Return
Type | Description |
---|---|
Float | positive infinity value |
IsNeg
Checks is a number is negative
function : IsNeg() ~ Bool
Return
Type | Description |
---|---|
Bool | true if negative, false otherwise |
Log10
Calculates the common (base-10) logarithm value
function : Log10() ~ Float
Return
Type | Description |
---|---|
Float | common (base-10) logarithm value |
Log2
Calculates the binary logarithm
function : Log2() ~ Float
Return
Type | Description |
---|---|
Float | binary logarithm |
Max
Returns the largest float value
function : native : Max(l:Float, r:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
l | Float | value to compare |
r | Float | value to compare |
Return
Type | Description |
---|---|
Float | largest float value |
Min
Returns the smallest float value
function : native : Min(r:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
r | Float | value to compare |
Return
Type | Description |
---|---|
Float | smallest float value |
Mod
Calculates the decimal mod
function : Mod(a:Float, b:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
a | Float | value |
b | Float | value |
Return
Type | Description |
---|---|
Float | decimial mod |
NegInf
Returns a negative infinity value
function : NegInf() ~ Float
Return
Type | Description |
---|---|
Float | negative infinity value |
Pow
Calculates the power value
function : Pow(b:Float, r:Int) ~ Float
Parameters
Name | Type | Description |
---|---|---|
b | Float | power base |
r | Int | power to raise |
Return
Type | Description |
---|---|
Float | pseudo power value |
Pow
Calculates the power value
function : Pow(b:Float, r:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
b | Float | power base |
r | Float | power to raise |
Return
Type | Description |
---|---|
Float | pseudo power value |
PrintLine
Prints values
function : native : PrintLine(v:Float[]) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
v | Float | values to print |
PrintLine
Prints values
function : native : PrintLine(v:Float[,]) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
v | Float | values to print |
Random
Returns a pseudo random value between 0.0 and 1.0, inclusive
function : Random() ~ Float
Return
Type | Description |
---|---|
Float | pseudo random value |
Random
Returns a pseudo random value between 0.0 and max, inclusive
function : Random(max:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
max | Float | maximum value |
Return
Type | Description |
---|---|
Float | pseudo random value |
Random
Returns a pseudo random value between 0.0 and 1.0, inclusive
function : Random(range_start:Float, range_end:Float) ~ Float
Parameters
Name | Type | Description |
---|---|---|
range_start | Float | minimum value |
range_end | Float | maximum value |
Return
Type | Description |
---|---|
Float | pseudo random value |
Sinh
Calculates the hyperbolic sine
function : Sinh() ~ Float
Return
Type | Description |
---|---|
Float | hyperbolic sine value |
Sqrt
Calculates the square root value
function : Sqrt() ~ Float
Return
Type | Description |
---|---|
Float | square root value |
Tanh
Calculates the hyperbolic tangent
function : Tanh() ~ Float
Return
Type | Description |
---|---|
Float | hyperbolic tangent value |
ToDegrees
Converts the value into degrees
function : ToDegrees() ~ Float
Return
Type | Description |
---|---|
Float | degree value |
ToRadians
Converts the value into radians
function : ToRadians() ~ Float
Return
Type | Description |
---|---|
Float | radian value |
ToString
Returns a string representation of the value
function : native : ToString() ~ String
Return
Type | Description |
---|---|
String | string representation of the value |