cos

Summary

Get the cosine of a number.

Usage

public static double cos(double x)

Returns

The cosine of the number. The returned value will be between -1 and 1 (inclusive).

Parameters

x

The number to get the cosine of (expressed in radians).

Description

Returns the cosine for a number (expressed in radians).

Examples

Basic Usage
1
2
3
4
5
import System;
 
Console.log(Math.cos(0));       // 1
Console.log(Math.cos(Math.PI)); // -1
Console.log(Math.cos(0.5));     // 0.8775825618903728

Share

HTML | BBCode | Direct Link