码迷,mamicode.com
首页 > 其他好文 > 详细

atan2 atan

时间:2014-05-01 09:51:23      阅读:435      评论:0      收藏:0      [点我收藏+]

标签:des   style   class   ext   strong   color   art   int   html   cti   htm   

atan2 definition

In terms of the standard arctan function, whose range is (?π/2, π/2), it can be expressed as follows:

mamicode.com,码迷

Notes:

  • This produces results in the range (?π, π], which can be mapped to [0, 2π) by adding  to negative results.
  • Traditionally, atan2(0, 0) is undefined.
    • The C function atan2, and most other computer implementations, are designed to reduce the effort of transforming cartesian to polar coordinates and so always define atan2(0, 0). On implementations without signed zero, or when given positive zero arguments, it is normally defined as 0. It will always return a value in the range [?π, π] rather than raising an error or returning a NaN (Not a Number).
    • Systems supporting symbolic mathematics normally return an undefined value for atan2(0,0) or otherwise signal that an abnormal condition has arisen.
  • For systems implementing signed zeroinfinities, or Not a Number (for example, IEEE floating point), it is common to implement reasonable extensions which may extend the range of values produced to include ?π and ?0. These also may return NaN or raise an exception when given a NaN argument.
  • For systems implementing signed zero (for example, IEEE floating point), atan2(-0, x), x < 0 returns the value ?π. atan2(+0, x), x < 0 still returns +π.

 atan

    interval is (-pi/2,pi/2) 

 

atan2 atan,码迷,mamicode.com

atan2 atan

标签:des   style   class   ext   strong   color   art   int   html   cti   htm   

原文地址:http://www.cnblogs.com/gujianhan/p/3702350.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!