F.20. Math
Function | Returns | Description |
---|---|---|
abs(int number) | int | Returns the absolute value of the number. |
ceil(float number) | float | Returns the next highest integer value of the number. |
floor(float number) | float | Returns the next lowest integer value from the number. |
round(float number [, int precision]) | float | Returns the number rounded to specified precision. |
sin(float number) | float | Returns the sine of the number in radians. |
cos(float number) | float | Returns the cosine of the number in radians. |
tan(float number) | float | Returns the tangent of the number in radians. |
asin(float number) | float | Returns the arc sine of the number in radians. |
acos(float number) | float | Returns the arc cosine of the number in radians. |
atan(float number) | float | Returns the arc tangent of the number in radians. |
atan2(float y, float x) | float | Returns the arc tangent of y/x, with the resulting quadrant determined by the signs of y and x. |
sinh(float number) | float | Returns the hyperbolic sine of the number, defined as (exp(number) - exp(-number))/2. |
cosh(float number) | float | Returns the hyperbolic cosine of the number, defined as (exp(number) + exp(-number))/2. |
tanh(float number) | float | Returns the hyperbolic tangent of the number, defined as sinh(number)/cosh(number). |
asinh(float number) | float | Returns the inverse hyperbolic sine of the number, that is, the value whose hyperbolic sine is number. |
acosh(float number) | float | Returns the inverse hyperbolic cosine of the number, that is, the value whose hyperbolic cosine is number. |
atanh(float number) ... |
Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.