美文网首页
ios 常用函数

ios 常用函数

作者: 码农_会写诗 | 来源:发表于2019-07-30 17:49 被阅读0次

在iOS开发当中。。。我们往往会涉及到一些算法。。。为了节省一些时间。我把部分常用函数分享出来。。。

rand() ----随机数

abs() / labs() ----整数绝对值

fabs() / fabsf() / fabsl() ----浮点数绝对值

floor() / floorf() / floorl() ----向下取整

ceil() / ceilf() / ceill() ----向上取整

round() / roundf() / roundl() ----四舍五入

sqrt() / sqrtf() / sqrtl() ----求平方根

fmax() / fmaxf() / fmaxl() ----求最大值

fmin() / fminf() / fminl() ----求最小值

hypot() / hypotf() / hypotl() ----求直角三角形斜边的长度

fmod() / fmodf() / fmodl() ----求两数整除后的余数

modf() / modff() / modfl() ----浮点数分解为整数和小数

frexp() / frexpf() / frexpl() ----浮点数分解尾数和二为底的指数

sin() / sinf() / sinl() ----求正弦值

sinh() / sinhf() / sinhl() ----求双曲正弦值

cos() / cosf() / cosl() ----求余弦值

cosh() / coshf() / coshl() ----求双曲余弦值

tan() / tanf() / tanl() ----求正切值

tanh() / tanhf() / tanhl() ----求双曲正切值

asin() / asinf() / asinl() ----求反正弦值

asinh() / asinhf() / asinhl() ----求反双曲正弦值

acos() / acosf() / acosl() ----求反余弦值

acosh() / acoshf() / acoshl() ----求反双曲余弦值

atan() / atanf() / atanl() ----求反正切值

atan2() / atan2f() / atan2l() ----求坐标值的反正切值

atanh() / atanhf() / atanhl() ----求反双曲正切值

作者:Joson_Ju

链接:https://www.jianshu.com/p/0ca725ecf7f7

来源:简书

简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

相关文章

  • Objective-C中的数学函数math.h

    数学函数库,一些数学计算的公式的具体实现是放在math.h里,具体有: 常用函数: 数学常量: 常用函数: iOS...

  • 常用数学函数讲解

    iOS开发常用函数 1、 三角函数 double sin (double); 正弦 double cos (dou...

  • iOS 常用函数

  • iOS常用函数

    rand() ----随机数 abs() / labs() ----整数绝对值 fabs() / fabsf() ...

  • ios 常用函数

    在iOS开发当中。。。我们往往会涉及到一些算法。。。为了节省一些时间。我把部分常用函数分享出来。。。 rand()...

  • ReactiveObjC入门

    ReactiveObjC基础用法 iOS开发三种编程方式(响应式编程、函数编程、链式编程),函数编程最常用,链式编...

  • php-常用函数

    常用函数 常用函数: 数组常用函数

  • iOS 常用C函数

    算术函数 三角函数 指数函数 常数

  • iOS-常用函数

    算术函数 int rand():随机数生成。 int abs(int a):整数的绝对值 double fabs(...

  • iOS常用的函数

    1、 三角函数 2 、反三角函数 3 、双曲三角函数 4 、指数与对数 5 、取整 6 、绝对值 7 、标准化浮点...

网友评论

      本文标题:ios 常用函数

      本文链接:https://www.haomeiwen.com/subject/xtforctx.html