These functions allow the programmer to use floating-point operations. Such operations are seldom needed, but may be useful for certain effects, such as circular movement. [In the future, if there is a greater need for floating-point calculations, a type system may be added to the compiler.]

Functions




function IntToFloat (IntValue)

Converts an integer value to a floating-point value.

Parameters

IntValue Value to convert (int).
Returns

Result (float).




function FloatToInt (FloatValue)

Converts a floating-point value to an integer value.

Parameters

FloatValue Value to convert (float).
Returns

Result (int).




function FloatAdd (FloatLeftOperand, FloatRightOperand)

Adds two floating-point numbers.

Parameters

FloatLeftOperand Left operand (float).

FloatRightOperand Right operand (float).
Returns

Result (float).




function FloatSub (FloatLeftOperand, FloatRightOperand)

Subtracts two floating-point numbers.

Parameters

FloatLeftOperand Left operand (float).

FloatRightOperand Right operand (float).
Returns

Result (float).




function FloatMul (FloatLeftOperand, FloatRightOperand)

Multiplies two floating-point numbers.

Parameters

FloatLeftOperand Left operand (float).

FloatRightOperand Right operand (float).
Returns

Result (float).




function FloatDiv (FloatLeftOperand, FloatRightOperand)

Divides two floating-point numbers.

Parameters

FloatLeftOperand Left operand (float).

FloatRightOperand Right operand (float).
Returns

Result (float).




function FloatMod (FloatLeftOperand, FloatRightOperand)

Divides two floating-point numbers, and returns the remainder.

Parameters

FloatLeftOperand Left operand (float).

FloatRightOperand Right operand (float).
Returns

Result (float).




function FloatCompare (FloatFirstValue, FloatSecondValue)

Compares two floating-point values. (There is no test for equality of floating-point values, since they are only approximations.)

Parameters

FloatFirstValue First value (float).

FloatSecondValue Second value (float).
Returns

Returns true if the first value is greater than the second, or false if it is less.




function FloatCeiling (FloatValue)

Calculates the ceiling of a value. Use this function to round-up to the nearest integer.

Parameters

FloatValue Value (float).
Returns

Result (int).




function FloatFloor (FloatValue)

Calculates the floor of a value. Use this function to round-down to the nearest integer.

Parameters

FloatValue Value (float).
Returns

Result (int).




function FloatSine (FloatRadians)

Calculates the sine of an angle in radians.

Parameters

FloatRadians Angle in radians (float).
Returns

Result (float).




function FloatCosine (RadiansFloat)

Calculates the cosine of an angle in radians.

Parameters

RadiansFloat Angle in radians (float).
Returns

Result (float).




function FloatTangent (RadiansFloat)

Calculates the tangent of an angle in radians.

Parameters

RadiansFloat Angle in radians (float).
Returns

Result (float).




function FloatArcSine (FloatRadians)

Calculates the arc sine of an angle in radians.

Parameters

FloatRadians Angle in radians (float).
Returns

Result (float).




function FloatArcCosine (RadiansFloat)

Calculates the cosine of an angle in radians.

Parameters

RadiansFloat Angle in radians (float).
Returns

Result (float).




function FloatArcTangent (RadiansFloat)

Calculates the tangent of an angle in radians.

Parameters

RadiansFloat Angle in radians (float).
Returns

Result (float).




function FloatAbsolute (FloatValue)

Calculates the absolute value.

Parameters

FloatValue Value (float).
Returns

Result (float).




function FloatSquareRoot (FloatValue)

Calculates the square root of a value.

Parameters

FloatValue Value (float).
Returns

Result (float).




function FloatPower (FloatValue, FloatPower)

Raises a value to a power.

Parameters

FloatValue Value (float).

FloatPower Value (float).
Returns

Result (float).




function FloatExp (FloatValue)

Calculates the exponential of a value.

Parameters

FloatValue Value (float).
Returns

Result (float).




function FloatLog (FloatValue)

Calculates the natural logarithm of a value.

Parameters

FloatValue Value (float).
Returns

Result (float).




function FloatLog10 (FloatValue)

Calculates the base-10 logarithm of a value.

Parameters

FloatValue Value (float).
Returns

Result (float).