invantive documentationpart of invantive cloud
Invantive Support ForumsLog In / Sign Up

COS

Syntax

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> COS[COS]:::quoted
    COS --> End((END))

Purpose

The COS SQL function returns the cosine of the provided angle.

See also ACOS.

Parameters:

  • Input (decimal): the angle to get the cosine of.

Returns: A number which represents the cosine of the provided angle as decimal.

Examples

COS retrieves the cosine of the angle 0:

select cos(0)

--------
1

COS retrieves the cosine of the angle 1, rounded to four decimals:

select round(cos(1), 4)

--------
0.5403