Computes the sine, cosine, or tangent of the specified argument (in radians.)
Expression to compute the sine, cosine, or tangent of. (float)
Returns bottom if exprn evaluates to bottom.
value = sin(pi/2)
Sets value to the sine of pi/2, which is approximately 1.0 (possibly with some rounding error.)
value = cos(0)
Sets value to the cosine of 0, which is approximately 1.0 (possibly with some rounding error.)
value = tan(pi/4)
Sets value to the tangent of pi/4, which is approximately 1.0 (possibly with some rounding error.)
Note that the Sin, Cos, and Tan triggers only accept radian values as arguments. In order to compute the Sin, Cos, or Tan of a value in degrees, the value must first be converted into radian form by multiplying by Pi and dividing by 180, for example;
value = sin(90*Pi/180.0)
This will set value to the Sin of 90 degrees, which is approximately 1.0. The expression of 90*Pi/180 is the conversion of the value of the angle from degree to radian form.
Another thing to note is that because the tangent of 90 degrees is mathematically undefined, attempting to compute that value using Tan will return Bottom. This also holds true for other values where the tangent of that value is undefined (i.e., 270 degrees, 450 degrees, 630 degrees, etc).