[gnumeric] Fix documentation of ATAN2. [#640344]



commit 5a1d5e1b10bb254609ad832f2be55807299758d7
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Sun Jan 23 16:57:11 2011 -0700

    Fix documentation of ATAN2. [#640344]
    
    2011-01-23 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* functions.c (help_atan2): fix order of arguments
    
    2011-01-23  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* func.defs: update
    	* functions.xml: update

 NEWS                        |    1 +
 doc/C/ChangeLog             |    7 ++++++-
 doc/C/func.defs             |   13 +++++++------
 doc/C/functions.xml         |   14 +++++++++-----
 plugins/fn-math/ChangeLog   |    4 ++++
 plugins/fn-math/functions.c |   17 ++++++++++++-----
 6 files changed, 39 insertions(+), 17 deletions(-)
---
diff --git a/NEWS b/NEWS
index 7a97192..d13648a 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Andreas:
 	* Ensure we have sub- and sperscript icons. [#639086]
 	* Fix advanced filter. [#639444]
 	* Suppress function tooltips on text-formatted cells. [#638832]
+	* Fix documentation of ATAN2. [#640344]
 
 Jean:
 	* Only disable the formula bar when a chart sheet is selected. [#636031]
diff --git a/doc/C/ChangeLog b/doc/C/ChangeLog
index d9cc5bc..32db7c6 100644
--- a/doc/C/ChangeLog
+++ b/doc/C/ChangeLog
@@ -1,4 +1,9 @@
-2011-12-10  Andreas J. Guelzow <aguelzow pyrshep ca>
+2011-01-23  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* func.defs: update
+	* functions.xml: update
+
+2011-01-08  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* func.defs: update
 	* functions.xml: update
diff --git a/doc/C/func.defs b/doc/C/func.defs
index 1a6bfd3..f664e65 100644
--- a/doc/C/func.defs
+++ b/doc/C/func.defs
@@ -1967,7 +1967,7 @@ The depreciation coefficient used is:
 @{rate}: risk-free interest rate to the exercise date in percent
 @{volatility}: annualized volatility of the asset in percent for the period through to the exercise date
 @{cost_of_carry}: net cost of holding the underlying asset (for common stocks, the risk free rate less the dividend yield), defaults to 0
- DESCRIPTION=OPT_BS_DELTA uses the Black-Scholes model to calculate the 'theta' of a European option struck at @{strike} on an asset with spot price @{spot}. The theta of an option is the rate of change of its price with respect to time to expiry.
+ DESCRIPTION=OPT_BS_THETA uses the Black-Scholes model to calculate the 'theta' of a European option struck at @{strike} on an asset with spot price @{spot}. The theta of an option is the rate of change of its price with respect to time to expiry.
 @NOTE=Theta is expressed as the negative of the rate of change of the option value, per 365.25 days.
 @SEEALSO=OPT_BS,OPT_BS_DELTA,OPT_BS_RHO,OPT_BS_VEGA,OPT_BS_GAMMA
 
@@ -3091,13 +3091,14 @@ The depreciation coefficient used is:
 
 @CATEGORY=Mathematics
 @FUNCTION=ATAN2
- SHORTDESC=the arc tangent of the ratio of @{y} and @{x}
- SYNTAX=ATAN2(y,x)
- ARGUMENTDESCRIPTION=@{y}: y-coordinate
- {x}: x-coordinate
- DESCRIPTION=ATAN2 calculates the direction from the origin to (@{x},@{y}) as an angle in radians.
+ SHORTDESC=the arc tangent of the ratio of @{y}/@{x}
+ SYNTAX=ATAN2(x,y)
+ ARGUMENTDESCRIPTION=@{x}: x-coordinate
+ {y}: y-coordinate
+ DESCRIPTION=ATAN2 calculates the direction from the origin to the point (@{x},@{y}) as an angle from the x-axis in radians.
 @NOTE=The result will be between Ï? and +Ï?. The order of the arguments may be unexpected.
 @EXCEL=This function is Excel compatible.
+ ODF=This function is OpenFormula compatible.
 @SEEALSO=ATAN,ATANH,COS,SIN
 
 @CATEGORY=Mathematics
diff --git a/doc/C/functions.xml b/doc/C/functions.xml
index e161875..dbc6f7a 100644
--- a/doc/C/functions.xml
+++ b/doc/C/functions.xml
@@ -6548,7 +6548,7 @@
       </refsect1>
       <refsect1>
         <title>Description</title>
-        <para>OPT_BS_DELTA uses the Black-Scholes model to calculate the 'theta' of a European option struck at <parameter>strike</parameter> on an asset with spot price <parameter>spot</parameter>. The theta of an option is the rate of change of its price with respect to time to expiry.</para>
+        <para><function>OPT_BS_THETA</function> uses the Black-Scholes model to calculate the 'theta' of a European option struck at <parameter>strike</parameter> on an asset with spot price <parameter>spot</parameter>. The theta of an option is the rate of change of its price with respect to time to expiry.</para>
       </refsect1>
       <refsect1>
         <title>Note</title>
@@ -10242,20 +10242,20 @@
           <function>ATAN2</function>
         </refname>
         <refpurpose>
-        the arc tangent of the ratio of <parameter>y</parameter> and <parameter>x</parameter>
+        the arc tangent of the ratio of <parameter>y</parameter>/<parameter>x</parameter>
       </refpurpose>
       </refnamediv>
       <refsynopsisdiv>
-        <synopsis><function>ATAN2</function>(<parameter>y</parameter>,<parameter>x</parameter>)</synopsis>
+        <synopsis><function>ATAN2</function>(<parameter>x</parameter>,<parameter>y</parameter>)</synopsis>
       </refsynopsisdiv>
       <refsect1>
         <title>Arguments</title>
-        <para><parameter>y</parameter>: y-coordinate</para>
         <para><parameter>x</parameter>: x-coordinate</para>
+        <para><parameter>y</parameter>: y-coordinate</para>
       </refsect1>
       <refsect1>
         <title>Description</title>
-        <para><function>ATAN2</function> calculates the direction from the origin to (<parameter>x</parameter>,<parameter>y</parameter>) as an angle in radians.</para>
+        <para><function>ATAN2</function> calculates the direction from the origin to the point (<parameter>x</parameter>,<parameter>y</parameter>) as an angle from the x-axis in radians.</para>
       </refsect1>
       <refsect1>
         <title>Note</title>
@@ -10266,6 +10266,10 @@
         <para>This function is Excel compatible.</para>
       </refsect1>
       <refsect1>
+        <title>OpenDocument Format (ODF) Compatibility</title>
+        <para>This function is OpenFormula compatible.</para>
+      </refsect1>
+      <refsect1>
         <title>See also</title>
         <para><link linkend="gnumeric-ATAN"><function>ATAN</function></link>,
         <link linkend="gnumeric-ATANH"><function>ATANH</function></link>,
diff --git a/plugins/fn-math/ChangeLog b/plugins/fn-math/ChangeLog
index 630beb4..c5db5cd 100644
--- a/plugins/fn-math/ChangeLog
+++ b/plugins/fn-math/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-23 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* functions.c (help_atan2): fix order of arguments
+	
 2010-11-25  Morten Welinder <terra gnome org>
 
 	* Release 1.10.12
diff --git a/plugins/fn-math/functions.c b/plugins/fn-math/functions.c
index 20b5666..71c41bc 100644
--- a/plugins/fn-math/functions.c
+++ b/plugins/fn-math/functions.c
@@ -408,13 +408,20 @@ gnumeric_atanh (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 /***************************************************************************/
 
 static GnmFuncHelp const help_atan2[] = {
-        { GNM_FUNC_HELP_NAME, F_("ATAN2:the arc tangent of the ratio of @{y} and @{x}")},
-        { GNM_FUNC_HELP_ARG, F_("y:y-coordinate")},
+        { GNM_FUNC_HELP_NAME, F_("ATAN2:the arc tangent of the ratio of "
+				 "@{y}/@{x}")},
         { GNM_FUNC_HELP_ARG, F_("x:x-coordinate")},
-        { GNM_FUNC_HELP_DESCRIPTION, F_("ATAN2 calculates the direction from the origin to (@{x},@{y}) as an angle in radians.")},
-	{ GNM_FUNC_HELP_NOTE, F_("The result will be between \xcf\x80 and +\xcf\x80.")},
-	{ GNM_FUNC_HELP_NOTE, F_("The order of the arguments may be unexpected.")},
+        { GNM_FUNC_HELP_ARG, F_("y:y-coordinate")},
+        { GNM_FUNC_HELP_DESCRIPTION, F_("ATAN2 calculates the direction from "
+					"the origin to the point (@{x},@{y}) "
+					"as an angle from the x-axis in "
+					"radians.")},
+	{ GNM_FUNC_HELP_NOTE, F_("The result will be between \xcf\x80 and "
+				 "+\xcf\x80.")},
+	{ GNM_FUNC_HELP_NOTE, F_("The order of the arguments may be "
+				 "unexpected.")},
 	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+	{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.") },
         { GNM_FUNC_HELP_EXAMPLES, "=ATAN2(0.5,1.0)" },
         { GNM_FUNC_HELP_EXAMPLES, "=ATAN2(-0.5,2.0)" },
         { GNM_FUNC_HELP_SEEALSO, "ATAN,ATANH,COS,SIN"},



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]