Several math functions commonly used by IOS

Source: Internet
Author: User

1. Take an integer

double ceil (doubledouble floor (double )

2. Absolute value

double fabs (doubledouble cabs (struct complex znum), absolute value of complex number

3. Take surplus

double modf (Double double * double fmod ( double double)

4. Index

Double exp ( double double sqrt (double double log (  Double double log10 ( double Double pow (double Double  float powf (floatfloat

5. Normal Trigonometric functions

 double sin ( double double cos (double double tan (  Double

6, Inverse trigonometric function

Double ASIN (double); The result is between [-pi/2, pi/2double ACOs (double); The result is between [0   Double atan (double); Anyway tangent (primary value), the result is between [-pi/2, pi/2double atan2 (doubledouble ); Tangent (rounded value), results in [-pi, PI]

7, Triangle Other

double hypot (doubledouble y), known right triangle two right angle side length, to seek hypotenuse length

Several math functions commonly used by IOS

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.