1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
<html>
<head>
<title>EAGLE Help: Absolute, Maximum and Minimum Functions</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>Absolute, Maximum and Minimum Functions</center></h1>
<hr>
<dl>
<dt>
<b>Function</b>
<dd>
Absolute, maximum and minimum functions.
<p>
<dt>
<b>Syntax</b>
<dd>
<tt>type abs(type x);</tt><br>
<tt>type max(type x, type y);</tt><br>
<tt>type min(type x, type y);</tt>
<p>
<dt>
<b>Returns</b>
<dd>
<tt>abs</tt> returns the absolute value of <tt>x</tt>.<br>
<tt>max</tt> returns the maximum of <tt>x</tt> and <tt>y</tt>.<br>
<tt>min</tt> returns the minimum of <tt>x</tt> and <tt>y</tt>.
<p>
The return type of these functions is the same as the (larger) type
of the arguments. <tt>type</tt> must be one of
<tt><a href=155.htm>char</a></tt>,
<tt><a href=156.htm>int</a></tt> or
<tt><a href=157.htm>real</a></tt>.
<p>
</dl>
<b>Example</b>
<pre>
real x = 2.567, y = 3.14;
printf("The maximum is %f\n", max(x, y));
</pre>
<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright © 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>
|