atan() - 反正切 - php 数学函数
atan()
(PHP 4, PHP 5, PHP 7)
反正切
说明
atan(float $arg):float返回$arg的反正切值,单位是弧度。atan()是tan()的反函数,它的意思是在atan()范围里的每个值都是a==tan(atan(a))。
参数
$arg要处理的参数
返回值
$arg的反正切弧度。
参见
tan()
正切atanh()
反双曲正切asin()
反正弦acos()
反余弦
Contrary to the current description, it should hold y == tan(atan(y)) for ALL y. However, x == atan(tan(x)) only holds for those x which are in the range of atan, which are those x with -pi/2to obtain the direction of the line, you are better to use the function, since the regular atan function will only return arguments in the half-plane, ie. if y2-y1 and x2-x1 are negative, atan will give you an angle measurement less than 90 degrees, while it really should be between 180 and 270Arc Tan curve manipulation. I used this formula to help with increasing and then diminishing return for y given an increasing x for a game. Ie: Food production (output) is y. Food research is x. The more research you put into x the more you produce, however after a certain point you get less reward. y = atan(x - pi()) + pi()/2; The + pi()/2 moves it up the y axis so you'd add more if you want it to start higher. The x - pi() moves it to the right so you'd minus more to move it more. If you want stretched along the y axis change it to 2 * atan( ...... ) Dunno how useful it is... but it's there. Dazarcctg function function actg($arg){ return acos($arg/(sqrt(1 + $arg * $arg))); }
内容声明:本文中引用的各种信息及资料(包括但不限于文字、数据、图表及超链接等)均来源于该信息及资料的相关主体(包括但不限于公司、媒体、协会等机构)的官方网站或公开发表的信息。部分内容参考包括:(百度百科,百度知道,头条百科,中国民法典,刑法,牛津词典,新华词典,汉语词典,国家院校,科普平台)等数据,内容仅供参考使用,不准确地方联系删除处理!本站为非盈利性质站点,本着为中国教育事业出一份力,发布内容不收取任何费用也不接任何广告!)