cos()

Returns the cosine of the specified angle.

Syntax

cos(RADIAN_EXPR)
Required Parameters
RADIAN_EXPR
Radian expression. This function returns null when it receives an argument value that is not a number.

Usage

json "{}" | eval cos=cos(0) => 1

json "{}" | eval cos=cos(30 * 3.14 / 180) => 0.866158094405463

json "{}" | eval cos=cos(60 * 3.14 / 180) => 0.5004596890082058

json "{}" | eval cos=cos(90 * 3.14 / 180) => 0.0007963267107332633

json "{}" | eval cos=cos("0") => null