OpenBI Docs Buy

COS

The cosine of an angle in radians.

Group: Math. Compatible with DAX.

Syntax

COS ( <number> )
ParameterTypeDescription
numberNumberAn angle in radians.

Returns

Number. A number from -1 to 1: 1 for an angle of 0, -1 for half a turn.

Remarks

  • Angles are in radians. To work in degrees, wrap the angle in RADIANS first.
  • A blank counts as an angle of 0, so its cosine is 1.
  • Floating point leaves a trace: COS ( PI () / 2 ) is a tiny number rather than exactly 0.
  • Very large angles, such as 1E9 radians, are an error.

Examples

Cosines

EVALUATE
ROW (
    "Of 0", COS ( 0 ),
    "Of pi", COS ( PI () ),
    "Of 60°", COS ( RADIANS ( 60 ) ),
    "Of blank", COS ( BLANK () )
)
Of 0Of piOf 60°Of blank
1-10.51

SIN, TAN, ACOS, RADIANS.

Last updated · OpenBI Studio 0.3.74