Previous Topic: CONCATENATENext Topic: DATECHG


COSINE

Purpose

Returns the cosine of a numeric value that represents an angle in either degrees or radians.

Syntax

Cosine (degrees):

►►─┬─ COSINE-DEGREES ─┬─ ( value ) ───────────────────────────────────────────►◄
   └─ COSDeg ─────────┘

Cosine (radians):

►►─┬─ COSINE-RADIANS ─┬─ ( value ) ───────────────────────────────────────────►◄
   └─ COSRad ─────────┘

Parameters

COSINE-DEGREES

Returns a cosine value in degrees.

COSINE-RADIANS

Returns a cosine value in radians.

value

Specifies the numeric value representing the angle, in degrees or radians, whose cosine is calculated.

Value can be:

Example

In the following example, the cosine (degrees) of 60 is calculated and moved to WK-RESULT (PIC S999V9999):

MOVE COSD(60) TO WK-RESULT.
Return value: 0.5