atan2 definition

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

Notes:

  • This produces results in the range (−π, π], which can be mapped to [0, 2π) by adding 2π 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的更多相关文章

  1. MySQL所有函数及操作符

    参考:Function and Operator Reference Name Description ABS() Return the absolute value ACOS() Return th ...

  2. MySQL数学函数

    官方文档:Numeric Functions and Operators Name Description ABS() Return the absolute value ACOS() Return ...

  3. 2019全国大学生信息安全竞赛部分Web writeup

    JustSoso 0x01 审查元素发现了提示,伪协议拿源码 /index.php?file=php://filter/read=convert.base64-encode/resource=inde ...

  4. 18.16 gcc-3.4.5编译错误及解决方法集锦

    18.16.1 自写BootLoader错误 ERROR : boot.c:: warning: return type of 'main' is not `int' ANSWER : int mai ...

  5. DRDS SQL兼容性

    SQL 兼容性 更新时间:2017-06-07 13:26:11     DRDS 高度兼容 MySQL 协议和语法,但由于分布式数据库和单机数据库存在较大的架构差异,存在 SQL 使用限制.相关兼容 ...

  6. h5+js随机拖动鼠标产生动画效果

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  7. 几道web题简单总结

    拖了好长时间,总结一下这一段时间做的几道值得记录一下的题目,有的没做出来,但是学习到了新的东西 1.homebrew event loop ddctf的一道题目,学到了python eval函数的用法 ...

  8. 用trie树实现输入提示功能,输入php函数名,提示php函数

    参照刘汝佳的trie树 结构体 #include "stdio.h" #include "stdlib.h" #include "string.h&q ...

  9. CG 内置函数 和 HLSL 内置函数

    CG 内置函数  英伟达官网链接: http://http.developer.nvidia.com/Cg/index_stdlib.html absacosallanyasinatan2atanbi ...

随机推荐

  1. how to insert js to iframe page in order to disabled open new page/window

    how to insert js to iframe page in order to disabled open new page/window js 禁用 iframe 中的页面打开新页面 htt ...

  2. HDU4641_K-string

    若它的一个子串出现的次数不少于K次,那么这个子串就是一个K-string. 现给出原串,每次可以向该串后面添加一个字符或者询问当前有多少个不同的K-string. 在线添加查询,解法直指SAM. 其实 ...

  3. BZOJ3173 TJOI2013最长上升子序列(splay)

    容易发现如果求出最后的序列,只要算一下LIS就好了.序列用平衡树随便搞一下,这里种一棵splay. #include<iostream> #include<cstdio> #i ...

  4. P1155 双栈排序

    题目描述 Tom最近在研究一个有趣的排序问题.如图所示,通过2个栈S1和S2,Tom希望借助以下4种操作实现将输入序列升序排序. 操作aaa 如果输入序列不为空,将第一个元素压入栈S1​ 操作b 如果 ...

  5. DSU模板(树的启发式合并)

    摘自Codeforces博客 With dsu on tree we can answer queries of this type: How many vertices in subtree of ...

  6. 【BZOJ5311/CF321E】贞鱼/Ciel and Gondolas(动态规划,凸优化,决策单调性)

    [BZOJ5311/CF321E]贞鱼/Ciel and Gondolas(动态规划,凸优化,决策单调性) 题面 BZOJ CF 洛谷 辣鸡BZOJ卡常数!!!!!! 辣鸡BZOJ卡常数!!!!!! ...

  7. 使用Java连接HBASE过程中问题总结

    本文是我个人在连接服务器的HBASE过程的一些问题总结. 一.用户和主机名的设置 1.1 报错:Insufficient permissions(user=Administartor) 原因:本地ho ...

  8. 前端学习 --Css -- 子元素的伪类

    :first-child 寻找父元素的第一个子元素,在所有的子元素中排序: :last-child 寻找父元素的最后一个子元素,在所有的子元素中排序: :nth-child 寻找父元素中的指定位置子元 ...

  9. bzoj2755【SCOI2012】喵星人的入侵

    输入格式 第一行为三个整数n,m,K,分别表示地图的长和宽,以及最多能放置的炮塔数量. 接下来的n行,每行包含m个字符,‘#’表示地图上原有的障碍,‘.’表示该处为空地,数据保证在原地图上存在S到T的 ...

  10. 团体程序设计天梯赛 L2-028. 秀恩爱分得快

    1.输入-0(第一部分.第二部分),输出-02.只统计与两个人的亲密程度,否则超时 Data: 4 14 -0 1 -2 3-0 1 -0 1 ------ 4 1 3 1 -2 3-0 1 -0 1 ...