Perl cos Function

Advertisements


Description

This function returns the cosine of EXPR, or $_ if EXPR is omitted. The value should be expressed in radians.

Syntax

Following is the simple syntax for this function:

cos EXPR

cos

Return Value

This function returns floating point number.

Example

Following is the example code showing its basic usage:


When above code is executed, it produced following result:




Advertisements
Advertisements