OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

# office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [OASIS Issue Tracker] Commented: (OFFICE-3822) atan2 in attribute draw:formula (19.171, part 1 ODF1.2) has wrong order of arguments

• From: OASIS Issues Tracker <workgroup_mailer@lists.oasis-open.org>
• To: office@lists.oasis-open.org
• Date: Fri, 22 Mar 2013 22:06:50 -0400 (EDT)

```    [ http://tools.oasis-open.org/issues/browse/OFFICE-3822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32836#action_32836 ]

Andreas Guelzow  commented on OFFICE-3822:
------------------------------------------

The openformula definition of ATAN2 is:
--------------------------------
Summary: Returns the principal value of the arc tangent given a coordinate of two numbers.
The angle is returned in radians.
Syntax: ATAN2( Number x ; Number y )
Returns: Number
Constraints: x<>0 or y<>0
Semantics: Computes the arc tangent of two numbers (the x and y coordinates of a point), in
radians. This is similar to ATAN(y/x), but the signs of the two numbers are taken into account so
that the result covers the full range from -PI() to +PI(). ATAN2(0;0) is implementation-defined,
evaluators may return 0 or an Error.
Returns a principal value -PI < result ≤ PI.
--------------------------------

It seems to me that the
draw:formula (19.171, part 1 ODF1.2) matches this definition, except that atan2 in that case is supposed to return the result in degrees

So the current definition in 19.171 is consistent with openformula (except that consistently 19.171 works with degrees while OpenFormula uses radians).

I thin kit is more important to be consistent within ODF parts 1,2,3 than with some common programming languages.

> atan2 in attribute draw:formula (19.171, part 1 ODF1.2) has wrong order of arguments
> ------------------------------------------------------------------------------------
>
>                 Key: OFFICE-3822
>                 URL: http://tools.oasis-open.org/issues/browse/OFFICE-3822
>             Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
>          Issue Type: Bug
>          Components: Graphics
>    Affects Versions: ODF 1.2
>            Reporter: Regina Henschel
>             Fix For: ODF 1.2 Errata 01, ODF 1.3
>
>
> The arguments of atan2 are specified in the order x,y. But the applications Apache OpenOffice, Symphony, LibreOffice, Calligra Stage, PowerPoint Preview 2013 use it in the order atan2(y,x).
> The order (y,x) is common for programming languages too.
> Does anyone know an application, that has implemented it in the order (x,y)?
> If not, I suggest to change it in ODF1.2 Errata.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-