Calculate the cosine of the argument. (answer in radians)
n - the value (converted to a double) to apply this function to.
A double scalar.
$value = cos(1.5); println("cosine of 1.5 radians is $value"); $value = cos(radians(1.5)); println("cosine of 1.5 degrees is $value");
cosine of 1.5 radians is 0.0707372016677029 cosine of 1.5 degrees is 0.9996573249755573