reCT

The only ByteSpace Project big enough to have its
own Website

Math Package

Include this Package with


package math;

[i] This package includes ReCTs math functions.


Random(maxNum -> int)

This function will return a random Int between 0 and the given Number.


RandomRange(minNum -> int, maxNum -> int)

This function will return a random Int in the range being from the first to the second given number.


Floor(num -> float)

This function will round the given Float to Floor and return the result as an Int.


Ceil(num -> float)

This function will round the given Float to Ceil and return the result an Int.


Pi()

This function will return Pi as a Float.


Sqrt(num -> float)

This function will return square root of the given number as a Float.


Pow(a -> float, b -> float)

This function will return the power of a to b as a Float.


Clamp(num -> float, min -> float, max -> float)

This function will Clamp the given number between the min and max value.


Abs(num -> float)

This function will return the ABS of the given number as a Float..


Sin(angleInRadiants -> float)

This function will return the SIN of the given angle as a Float..


Cos(angleInRadiants -> float)

This function will return the COS of the given angle as a Float..


Tan(angleInRadiants -> float)

This function will return the TAN of the given angle as a Float..


ASin(sin -> float)

This function will return the ASIN of the given sin in Radiants as a Float..


ACos(cos -> float)

This function will return the ACOS of the given cos in Radiants as a Float..


ATan(tan -> float)

This function will return the ATAN of the given tan in Radiants as a Float..


SinDeg(angleInDegrees -> float)

This function will return the SIN of the given angle as a Float..


CosDeg(angleInDegrees -> float)

This function will return the COS of the given angle as a Float..


TanDeg(angleInDegrees -> float)

This function will return the TAN of the given angle as a Float..


ASinDeg(sin -> float)

This function will return the ASIN of the given sin in Degrees as a Float..


ACosDeg(cos -> float)

This function will return the ACOS of the given cos in Degrees as a Float..


ATanDeg(tan -> float)

This function will return the ATAN of the given tan in Degrees as a Float..