Trigonometric Functions Summary
PowerBASIC provides only four trigonometric functions, as listed in the following table. Note that all of these functions use angles specified as radians, not degrees.
sin, cos, tan
All of the trigonometric functions are related to right triangles - those with one 90 degree angle. The longest side (opposite the 90 degree angle) is called the hypotenuse. The other two sides have no standard nomenclature.
The trigonometric functions are simply the 3 possible ratios of all three sides. For any one of the two non-90 degree angles, the terminology of "side adjacent" refers to the non-hypotenuse side, as does the "side opposite".
The three possible ratios, when referring to a specific angle in the triangle, are named sine (opposite/hypotenuse), cosine (adjacent/hypotenuse) and tangent (opposite/adjacent).
Fortunately, these values can be used to generate other commonly used trignometric functions, as given in the following equations:
csc = cosecant = 1/sin = hypotenuse/opposite sec = secant = 1/cos = hypotenuse/adjacent cot = cotangent = 1/tan = adjacent/opposite
Radians vs Degrees
The trignometric functions use radians - not degrees! Conversion factors are:
1 degree = 0.0174533 radians 1 radian = 57.29578 degrees pi radians = 180 degrees 2*pi radians = 360 degrees
Also, here's a diagram showing the relationship of radians and degrees over a complete circle.
Trigonometric Functions Listing
Here are one-line descriptions of all the trigonometric functions.
result = atn(1) ' result = .7894
result = cos(0.7854) ' result = 0.707
result = sin(0.7854) ' result = 0.707
result = tan(0.7854) ' result = 1.0
If you have any suggestions or corrections, please let me know.