Difference between revisions of "ApCoCoA-1:Num.FPart"
From ApCoCoAWiki
(Added FPart command) |
|||
Line 37: | Line 37: | ||
<seealso> | <seealso> | ||
− | <see>Ceil</see> | + | <see>Num.Ceil</see> |
− | <see>Floor</see> | + | <see>Num.Floor</see> |
<see>PrintLn</see> | <see>PrintLn</see> | ||
</seealso> | </seealso> |
Revision as of 13:22, 7 October 2009
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