| Concept Framework 2.2 documentation | Contents | Index |
| Name | Version | Deprecated |
| tan | version 1.0 | no |
| number tan(number angle) |
| angle | [in] The angle in radians |
|
Calculate the tangent of the specified angle.
The angle must be in radians. Multiply by M_PI/180 to convert degrees to radians. |
import standard.C.math
class Main {
function Main() {
var angle;
var radians;
var result;
// Calculate the tangent of 30 degrees.
angle = 30;
radians = angle * M_PI/180;
result = tan(radians);
echo "The tangent of 30 degrees is " + result + ".\n";
// Calculate the arctangent of the previous tangent.
radians = atan(result);
angle = radians * 180/M_PI;
echo "The previous tangent is equivalent to " + ceil(angle) + " degrees.\n";
}
}
Results
The tangent of 30 degrees is 0.57735026918962573.
The previous tangent is equivalent to 30 degrees.
|
| Documented by Simona Gabriela Plesuvu, generation time: Sun Jan 27 18:15:15 2013 GMT | (c)2013 Devronium Applications |