]> granicus.if.org Git - imagemagick/blobdiff - www/fx.html
(no commit message)
[imagemagick] / www / fx.html
index 46985b0bff5a41c1df64b3a4e89f7e1b0140ede8..5efd6688d3929ef90a20d38bc353c8af9d5279ce 100644 (file)
 
 <div class="sponsbox">
 <div  class="sponsor">
-   <a title="Sponsor: Free Catalogs" href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 20120801000600 -->
+   <a title="Sponsor: Atlas Multimedia" href="http://www.atlas-multimedia.de/">Atlas Multimedia</a><!-- 20101201000025 tanju.temurbas-->
+</div>
+<div  class="sponsor">
+  <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
 </div>
 <div  class="sponsor">
   <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
   <dt class="doc"> constants: </dt>
     <dd> e, Epsilon, QuantumRange, QuantumScale, Opaque, Pi, Transparent</dd>
   <dt class="doc"> Fx operators (in order of precedence): </dt>
-     <dd> ^ (power), *, /, % (modulo), +, -,
+     <dd> ^ (power), unary -, *, /, % (modulo), +, -,
      &lt;&lt;, &gt;&gt;, &lt;, &lt;=, &gt;, &gt;=, ==, !=,
      &amp; (bitwise AND),   | (bitwise OR),
      &amp;&amp; (logical AND),  || (logical OR),
 <li>statements are assignments or the final expression to return</li>
 <li>an assignment starts a statement, it is not an operator</li>
 <li>assignments to built-ins do not throw an exception and have no effect;  e.g. <kbd>r=3.0; r</kbd> returns the pixel red color value, not 3.0</li>
+<li>Unary operators have a lower priority than binary operators, that is, the unary minus (negation) has lower precedence than exponentiation, so -3^2 is interpreted as -(3^2) = -9.  Use parentheses to clarify your intent (e.g. (-3)^2 = 9).</li>
+<li>Similarly, care must be exercised when using the slash ('/') symbol. The string of characters <em>1/2x</em> is interpreted as (1/2)x. The contrary interpretation should be written explicitly as 1/(2x). Again, the use of parentheses helps clarify the meaning and should be used whenever there is any chance of misinterpretation.</li>
 </ul>
 
+
 </div>
 
 <h3>Source Images</h3>