Mathematical functions in iOS development and mathematical functions in iOS development

Source: Internet
Author: User
Tags mathematical functions

Mathematical functions in iOS development and mathematical functions in iOS development

In iOS development... We often involve some algorithms... To save some time... Let the APP be developed quickly... We need to have a certain understanding of various functions... Next... I will share some common functions... Hope to help you...

Rand () ---- Random Number

Abs ()/labs () ---- absolute integer value

Fabs ()/fabsf ()/fabsl () ---- absolute value of Floating Point

Floor ()/flograding ()/floorl () ---- round down

Ceil ()/ceilf ()/ceill () ---- rounded up

Round ()/roundf ()/roundl () ---- rounding

Sqrt ()/sqrtf ()/sqrtl () ---- calculate the square root

Fmax ()/fmaxf ()/fmaxl () ---- calculate the maximum value

Fmin ()/fminf ()/fminl () ---- minimum value

Hypot ()/hypotf ()/hypotl () ---- calculate the length of the oblique side of a right triangle

Fmod ()/fmodf ()/fmodl () ---- calculate the remainder after division of two numbers

Modf ()/modff ()/modfl () ---- the floating point is decomposed into integers and decimals.

Frexp ()/frexpf ()/frexpl () ---- floating point decomposition ending number and secondary base index

Sin ()/sinf ()/sinl () ---- returns the sine value.

Sinh ()/sinhf ()/sinhl () ---- returns the hyperbolic sine value.

Cos ()/cosf ()/cosl () ---- returns the cosine.

Cosh ()/coshf ()/coshl () ---- returns the hyperbolic cosine value.

Tan ()/tanf ()/tanl () ---- positive cut value

Tanh ()/tanhf ()/tanhl () ---- returns the hyperbolic tangent.

Asin ()/asinf ()/asinl () ---- returns the arc sine.

Asinh ()/asinhf ()/asinhl () ---- returns the arc hyperbolic sine value.

Acos ()/acossf ()/acossl () ---- returns the arc cosine.

Acossh ()/acosshf ()/acosshl () ---- returns the inverse hyperbolic cosine value.

Atan ()/atanf ()/atanl () ---- returns the inverse tangent value.

Atan2 ()/atan2f ()/atan2l () ---- returns the arc tangent of the coordinate value.

Atanh ()/atanhf ()/atanhl () ---- returns the inverse hyperbolic tangent.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.