XFloat Documentation - 6. Rounding Operations

Written by Integralus

6. Rounding Operations

  • .ceil(pos)

    • pos: (24-bit integer) the position of word to be ceiled

    Ceil current object in posth word position. If pos is 0, you will get only an integer part. If pos is negative, you will get the value below decimal point. If pos is positive, you will get the value above decimal point.

    This method returns 'this'.

  • .floor(pos)

    • pos: (24-bit integer) the position of word to be floored

    Floor current object in posth word position. If pos is 0, you will get only an integer part. If pos is negative, you will get the value below decimal point. If pos is positive, you will get the value above decimal point.

    This method returns 'this'.

  • .round(pos)

    • pos: (24-bit integer) the position of word to be rounded

    Round current object in posth word position. If pos is 0, you will get only an integer part. If pos is negative, you will get the value below decimal point. If pos is positive, you will get the value above decimal point.

    This method returns 'this'.

Rounding Operations Example


Other languages