`
java-mans
  • 浏览: 11339009 次
文章分类
社区版块
存档分类
最新评论

IOS开发常用数学函数

 
阅读更多
1、<wbr style="line-height:36px"></wbr>三角函数<wbr style="line-height:36px"></wbr>
  double sin (double);正弦<wbr style="line-height:36px"></wbr>
  double cos (double);余弦<wbr style="line-height:36px"></wbr>
  double tan (double);正切<wbr style="line-height:36px"></wbr>
  2 、反三角函数<wbr style="line-height:36px"></wbr>
  double asin (double); 结果介于[-PI/2, PI/2]<wbr style="line-height:36px"></wbr>
  double acos (double); 结果介于[0, PI]<wbr style="line-height:36px"></wbr>
  double atan (double); 反正切(主值), 结果介于[-PI/2, PI/2]<wbr style="line-height:36px"></wbr>
  double atan2 (double, double); 反正切(整圆值), 结果介于[-PI, PI]<wbr style="line-height:36px"></wbr>
  3 、双曲三角函数<wbr style="line-height:36px"></wbr>
  double sinh (double);<wbr style="line-height:36px"></wbr>
  double cosh (double);<wbr style="line-height:36px"></wbr>
  double tanh (double);<wbr style="line-height:36px"></wbr>
  4 、指数与对数<wbr style="line-height:36px"></wbr>
  double exp (double);求取自然数e的幂<wbr style="line-height:36px"></wbr>
  double sqrt (double);开平方<wbr style="line-height:36px"></wbr>
  double log (double); 以e为底的对数<wbr style="line-height:36px"></wbr>
  double log10 (double);以10为底的对数<wbr style="line-height:36px"></wbr>
  double pow(double x, double y);计算以x为底数的y次幂<wbr style="line-height:36px"></wbr>
  float powf(float x, float y); 功能与pow一致,只是输入与输出皆为浮点数<wbr style="line-height:36px"></wbr>
  5 、取整<wbr style="line-height:36px"></wbr>
  double ceil (double); 取上整<wbr style="line-height:36px"></wbr>
  double floor (double); 取下整<wbr style="line-height:36px"></wbr>
  6 、绝对值<wbr style="line-height:36px"></wbr>
  double fabs (double);求绝对值<wbr style="line-height:36px"></wbr>
  double cabs(struct complex znum) ;求复数的绝对值<wbr style="line-height:36px"></wbr>
  7 、标准化浮点数<wbr style="line-height:36px"></wbr>
  double frexp (double f, int *p); 标准化浮点数, f = x * 2^p, 已知f求x, p ( x介于[0.5, 1] )<wbr style="line-height:36px"></wbr>
  double ldexp (double x, int p); 与frexp相反, 已知x, p求f<wbr style="line-height:36px"></wbr>
  8 、取整与取余<wbr style="line-height:36px"></wbr>
  double modf (double, double*); 将参数的整数部分通过指针回传, 返回小数部分<wbr style="line-height:36px"></wbr>
  double fmod (double, double); 返回两参数相除的余数<wbr style="line-height:36px"></wbr>
  9 、其他<wbr style="line-height:36px"></wbr>
  double hypot(double x, double y);已知直角三角形两个直角边长度,求斜边长度<wbr style="line-height:36px"></wbr>
  double ldexp(double x, int exponent);计算x*(2的exponent次幂)<wbr style="line-height:36px"></wbr>
  double poly(double x, int degree, double coeffs [] );计算多项式<wbr style="line-height:36px"></wbr>
  nt matherr(struct exception *e);数学错误计算处理程序

Math.h放在哪里?那个是c的函数库:输入一个数学函数,然后双击这个函数-->右键用jump to definition就可以跳到这个头文件里了-->右键选Show in Finder,就知道这个头文件在哪里了。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics