swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
      Other Library Functions  
function   atan2    

Library: omtrig - trigonometry
Include: omtrig.xin
Return type: Opaque
Returns:       

Rectangular co-ordinates.


Declaration

  define external float function
       atan2 (value float x, value float y)


Purpose

Use atan2 with two rectangular co-ordinates, x and y, as arguments to calculate the arc tangent (y/x). atan2 gives you the degree in radians. This trigonometric function works in conjunction with hypot.

In mathematics, the arc tangent is also called the inverse tangent.

Out-of-range values, such as acos() and asin() for |x| > 1, return "not a number" (NaN).

Example:

  include "omtrig.xin"
  process
     local float x initial {1.1}
     local float y initial {0.7}
     local float atan2-value
     set atan2-value to atan2 (x, y)
     output "Take the rectangular co-ordinates x ( = "
         || "d" % x
         || " ) and y ( = "
         || "d" % y
         || " ) %n"
         || "Their arc tangent = "
         || "d" % atan2-value
         || "%n"
  ; Output: "Take the rectangular co-ordinates x ( = 1.1 ) and y ( = 0.7 )"
  ;          "Their arc tangent = 1.00406710927139"

        Other Library Functions
   acos
   asin
   atan
   atan2
   cos
   cosh
   hypot
   sin
   sinh
   tan
   tanh
 
----  

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ OMX ] [ ERRORS ]

Generated: August 11, 2000 at 3:06:59 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.