`
baby69yy2000
  • 浏览: 189669 次
  • 性别: Icon_minigender_1
  • 来自: 自己输入城市...
社区版块
存档分类
最新评论

acos atan

    博客分类:
  • AS
 
阅读更多
function acos2($num, $a) {
	//一,二象限acos可以计算,只需判断三四象限
	$angle = acos($num) * 180/pi();
	//三象限
	if ($a[0] < 0 && $a[1] < 0) {
		return 180 + $angle;
	//四象限
	}else if ($a[0] > 0 && $a[1] < 0) {
		return 360 - $angle;
	}
	return $angle;
}

function atg2($a) {
	//一,四象限atan可以计算
	$angle = atan($a[1]/$a[0]) * 180/pi();
	//二象限
	if ($a[0] < 0 && $a[1] > 0) {
		return 180 + $angle;
		//三象限
	}else if ($a[0] < 0 && $a[1] < 0) {
		return $angle - 180;
	}
	return $angle;
}
分享到:
评论

相关推荐

    自写数学处理函数(asin,acos,atan).zip

    `asin`、`acos`和`atan`是三角函数中的反三角函数,它们分别表示反正弦、反余弦和反正切。本压缩包文件提供了自编写的`asin`、`acos`和`atan`函数,以应对没有内置数学函数库的环境。 1. 反正弦函数`asin`: 反...

    一个科学计算器

    支持 sqr abs exp log rnd sgn opp ln sin cos tan cot csc sec asin acos atan acot acsc asec sinh cosh tanh coth csch sech asinh acosh atanh acoth acsch asech + - * / ^ ( ) ! % E+- K * New \:取余(5\3=...

    C程序员多功能位计算器

    7、支持单参函数 exp log log10 abs sqr sqrt sin cos tan asin acos atan 举例abs(-10) 结果=10 8、支持双参元函数 pow atan2 如pow(2,3) 结果=8 9、支持多参函数 min max 如min(2,5,1,8) 结果=1 9、支持位...

    分享一个好用的程序员计算器(公式、变量、计算过程、位键盘++)!!!

    7、支持单参函数 exp log log10 abs sqr sqrt sin cos tan asin acos atan 举例abs(-10) 结果=10 8、支持双参元函数 pow atan2 如pow(2,3) 结果=8 9、支持多参函数 min max 如min(2,5,1,8) 结果=1 9、支持位运算符 &...

    C++算术表达式求值(支持函数)

    C++算术表达式求值(支持函数) sin cos tan asin acos atan log sqrt cos(sin(sqrt(100*sqrt(100*10^2))))*(1.0e+5)/(1.0e-5) = 8.74513e+009

    basil::herb:简洁RPN计算器

    罗勒 具有简单终端界面的RPN计算器 命令: Pop off the stack: "pop", "p", "." Swap: "swap", "s", "," Push memory value to stack: "recall", "r", "]" Set memory value: ...acos atan 按键绑定: ESC: Exit

    PHP常见数学函数及BC高精度数学函数用法示例

    分享给大家供大家参考,具体如下: 1. bcadd 任意精度数的相加 2. bcsub 任意精度数的...sin cos tan asin acos atan(用弧度表达) deg2rad 角度转换成弧度 rad2deg 弧度转换成角度 指数 log 求自然对数, log10 求10

    Calculator:字符串计算器

    计算器 一个简单的字符串计算器特征运算+ - * / % ^ 括号支持科学数字符号支持嵌入式常数pi和e 嵌入式函数sin cos tan asin acos atan log exp sqrt abs 嵌入式积分函数gcd lcm mod div quot rem 使用函数prat打印...

    程序员二进制计算器 v1.36

    专为程序员打造的计算器,二进制运算强大,支持64位。 采用表达式驱动,输入表达式便即时显示结果,抛弃传统计算器繁琐的按钮,表达式可粘贴或回调重复使用。 支持二进制串直接运算,如0b1101 & 0b0011= 0b0001。...

    EvalEquation:此函数可用于评估写为字符串(字符数组)的方程(列表)。 它基于Shunting-yard算法-matlab开发

    此函数可用于计算写为字符串(字符数组)的方程。... 例子结果= EvalEquation('1 + 2 /(2 * 3)')...= 支持函数: sqrt abs sin cos tan asin acos atan exp sign round floor ceil 最大值(a,b) 最小值(a,b) 支持的常量

    oxtor's math draw-开源

    Oxtor的数学绘图程序是一个用于绘制图形数学家的程序,从数学函数开始,它是用Java编写的,支持的运算符是:+-* /()^ root log sin cos tan asin acos atan ln。 常数:e和P e =自然对数的基础P = PI

    (不使用库函数)单片机C语言查表法实现arctan arcsin 反正切 反正弦计算

    采用优化的单片机查表法计算atan角度的方法,重点解决了几个问题: (1)且用asin曲线计算代替难以描述的atan曲线,快速开方函数 (2)全部采用整形运算,加快了运算...本代码稍微加以修改也可以作为asin和acos的计算。

    Project-Diva-5.rar_21204EXP_acos

    先实现了将前缀表达式转换为逆波兰表达式的功能, 之后再利用逆波兰表达式对表达式进行求值, 支持+,-,*,/,^等运算, 以及sqrt, lg, ln, exp, sin, cos, tan, asin, acos, atan, sh, ch等函数操作

    易语言三角函数数学运算源码

    本文将详细介绍一篇关于“易语言三角函数数学运算源码”的文章,该文提供了一套完整的三角函数实现方法,包括正弦(Sin)、余弦(Cos)、正切(Tan)及其反函数(Asin、Acos、Atan)。由于易语言本身并不直接支持...

    C语言函数库函数详细介绍手册

    acos asin atan atan2 ceil cos cosh exp fabs floor fmod frexp hypot ldexp log log10 modf pow pow10 sin sinh sqrt tan tanh 输入输出函数 getchar kbhit printf putchar 系统...

    C 语言库函数使用手册

    acos asin atan atan2 ceil cos cosh exp fabs floor fmod frexp hypot ldexp log log10 modf pow pow10 sin sinh sqrt tan tanh 输入输出函数 getchar kbhit printf putchar ...

    C语言库函数速查 CHM

    acos asin atan atan2 ceil cos cosh exp fabs floor fmod frexp hypot ldexp log log10 modf pow pow10 sin sinh sqrt tan tanh 输入输出函数 getchar kbhit printf putchar 系统...

    C语言函数速查手册

    acos asin atan atan2 ceil cos cosh exp fabs floor fmod frexp hypot ldexp log log10 modf pow pow10 sin sinh sqrt tan tanh 输入输出函数 getchar kbhit printf putchar ...

    C语言函数速查

    acos asin atan atan2 ceil cos cosh exp fabs floor fmod frexp hypot ldexp log log10 modf pow pow10 sin sinh sqrt tan tanh 输入输出函数 getchar kbhit printf putchar ...

    单片机C语言查表法实现arctan arcsin 反正切 反正弦计算(不使用库函数)

    采用优化的单片机查表法计算atan角度的方法,重点解决了几个问题: (1)且用asin曲线计算代替难以描述的atan曲线,快速开方函数 (2)全部采用整形运算,加快了...本代码稍微加以修改也可以作为asin和acos的计算。

Global site tag (gtag.js) - Google Analytics