PHP cos() FunctionThe cos() function is predefined PHP function. It is used to return the cosine of a number. It returns a numeric value between -1 and 1, which represents the cosine of the angle. Syntax:
Example 1Output: Your number is : 3 By using 'cos()' function your number is :-0.98999249660045 Example 2Output: Your number is : -3 By using 'cos()' function your number is :-0.98999249660045 Example 3Output: Your number is : 0 By using 'cos()' function your number is :1 Example 4Output: Your number is : M_PI By using 'cos()' function your number is :-1 Example 5Output: Your number is 2*M_PI: 6.2831853071796 By using 'cos()' function your number is :1
Next TopicPHP Math
|