1. 程式人生 > >iOS 常用函式方法

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