ApCoCoA-1:Num.FPart

From ApCoCoAWiki
Revision as of 13:17, 7 October 2009 by Jan (talk | contribs) (Added FPart command)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

FPart

Returns the fractional part of a rational number.

Syntax

Num.FPart(Num:RAT):INT

Description

Returns the fractional part of a rational number Num. It is defined as Num - Floor(Num).

  • @param Num A rational number.

  • @return The fractional part.

Example

Num.FPart(8.1);
Num.FPart(-8.1);
Num.FPart(8);
1/10
-------------------------------
9/10
-------------------------------
0
-------------------------------



See also

Ceil

Floor

PrintLn