EAGLE Help Light

Rounding Functions

Funkce
Rounding functions.

Zápis
real ceil(real x);
real floor(real x);
real frac(real x);
real round(real x);
real trunc(real x);

Returns
ceil returns the smallest integer not less than x.
floor returns the largest integer not greater than x.
frac returns the fractional part of x.
round returns x rounded to the nearest integer.
trunc returns the integer part of x.

Příklad

real x = 2.567;
printf("The rounded value of %f is %f\n", x, round(x));


OBSAH Translation © 2001 ELCAD v.o.s., Copyright © 2001 CadSoft Computer GmbH