September 2001
Intermediate to advanced
768 pages
32h 45m
English
float sin(float num) Calculates the sine of a floating-point number.
Returns:
Floating-point sine value
Description:
Returns the sine for the argument passed in radians. Return values are from -1 to 1.
Version:
PHP 3, PHP 4
See also:
acos() asin() atan() atan2() cos() tan()
Example:
echo "The sine for the four cardinal points of a circle are:<br />\n"; echo "0 degrees: ", sin(0), "<br />\n"; echo "90 degrees: ", sin(pi() / 2), "<br />\n"; echo "180 degrees: ", sin(pi()), "<br />\n"; echo "270 degrees: ", sin(pi() + pi() / 2), "<br />\n"; |
Read now
Unlock full access