EAGLE Help

Absolute, Maximum and Minimum Functions


Function
Absolute, maximum and minimum functions.

Syntax
type abs(type x);
type max(type x, type y);
type min(type x, type y);

Returns
abs returns the absolute value of x.
max returns the maximum of x and y.
min returns the minimum of x and y.

The return type of these functions is the same as the (larger) type of the arguments. type must be one of char, int or real.

Example
real x = 2.567, y = 3.14;
printf("The maximum is %f\n", max(x, y));

Index Copyright © 2005 CadSoft Computer GmbH