Arduino function libraries~Math Library Function
Arduino Math Library
Arduino Math library includes a number of useful mathematical functions for manipulating floating-point numbers.
Functions are defined in the header math.h
#include < math.h >
double cos (double __x) // returns cosine of x
double fabs (double __x) // absolute value of a float
double fmod (double __x, double __y) // floating point modulo
double modf (double __value, double *__iptr) // breaks the argument value into
// integral and fractional parts
double sin (double __x) // returns sine of x
double sqrt (double __x) // returns square root of x
double tan (double __x) // returns tangent of x
double exp (double __x) // function returns the exponential value of x.
double atan (double __x) // arc tangent of x
double atan2 (double __y, double __x) // arc tangent of y/x
double log (double __x) // natural logarithm of x
double log10 (double __x) // logarithm of x to base 10.
double pow (double __x, double __y) // x to power of y
double square (double __x) // square of xMore Arduino Math Library Function examples will be seen in project examples
Comments
Post a Comment