iOS 开发中可能用到的一下C的数学函数

pow(X, Y)求X的Y次幂


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() ----求反双曲正切值


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值