iOS開發中的數學函數,iOS開發數學函數

來源:互聯網
上載者:User

iOS開發中的數學函數,iOS開發數學函數

在iOS開發當中。。。我們往往會涉及到一些演算法。。。為了節省一些時間。。。讓APP很快地被開發出來。。。我們需要對各類函數有一定的瞭解。。。接下來。。。我把部分常用函數分享出來。。。希望能幫到大家。。。

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.