add notes about small numbers for --alt-y-grid
[rrdtool.git] / doc / rrdgraph_rpn.pod
index c24be0f..74ac4ad 100644 (file)
@@ -1,4 +1,4 @@
-=head1 NAME  
+=head1 NAME
 
 rrdgraph_rpn - About RPN Math in rrdtool graph
 
@@ -69,15 +69,12 @@ Z<>
 
 =item Comparing values
 
-B<MIN, MAX> 
+B<MIN, MAX>
 
 Pops two elements from the stack and returns the smaller or larger,
-respectively.  The two numbers shouldn't be I<infinite> or I<unknown>,
-if they are that value is pushed back onto the stack as the result.
-
-= for comment
-XXX What happens above if both a infinite and undefined value are on the 
-XXX stack? Fritz
+respectively.  Note that I<infinite> is larger than anything else.
+If one of the input numbers is I<unknown> then the result of the operation will be
+I<unknown> too.
 
 B<LIMIT>
 
@@ -110,11 +107,24 @@ B<ATAN>
 
 Arctangent (output in radians).
 
+B<ATAN2>
+
+Arctangent of y,x components (output in radians).
+This pops one element from the stack, the x (cosine) component, and then
+a second, which is the y (sine) component.
+It then pushes the arctangent of their ratio, resolving the ambiguity between
+quadrants.
+
+Example: C<CDEF:angle=Y,X,ATAN2,RAD2DEG> will convert C<X,Y>
+components into an angle in degrees.
+
 B<FLOOR, CEIL>
 
 Round down or up to the nearest integer.
 
-Z<>
+B<DEG2RAD, RAD2DEG>
+
+Convert angle in degrees to radians, or radians to degrees.
 
 =item Set Operations
 
@@ -143,7 +153,7 @@ average is essentially computed as shown here:
                        delay     t0
                  <--------------->
                          delay       t1
-                     <--------------->  
+                     <--------------->
                               delay      t2
                          <--------------->
 
@@ -180,9 +190,9 @@ function cannot be used in B<VDEF> instructions.
 
 B<COUNT>
 
-Pushes the number 1 if this is the first value of the data set, the 
-number 2 if it is the second, and so on. This special value allows 
-you to make calculations based on the position of the value within 
+Pushes the number 1 if this is the first value of the data set, the
+number 2 if it is the second, and so on. This special value allows
+you to make calculations based on the position of the value within
 the data set. This function cannot be used in B<VDEF> instructions.
 
 Z<>