Concept Framework 1.0 documentation Contents | Index

standard.C.math.cos

Name Version Deprecated
cos version 1.0 no

Prototype:
number cos(number angle)

Parameters:
angle      [in] The angle in radians

Description:
Returns the cosine of the specified angle.
The angle must be in radians. Multiply by PI/180 to convert degrees to radians.

Example:
import standard.C.math


class Main {
function Main() {
// Evaluate sin(2 * X) = 2 * sin(X) * cos(X).
var X = 45;
var angle = X * M_PI/180;
echo "sin(2 * " + X + ") = " + 2*sin(angle)*cos(angle);
}
}


Results
sin(2 * 45) = 1

Returns:
Returns the cosine of the specified angle.

Documented by Simona Gabriela Plesuvu, generation time: Thu Oct 15 20:02:03 2009 GMT(c)2009 RadGs Software