µVision User's Guide

legacy

__sin

Summary
double __sin (
  double x);   /* value to calculate sine for */
Description

The __sin debugger function calculates the trigonometric sine of the floating-point value x.

Return Value

The __sin function returns the sine of x.

See Also

__cos, __tan

Example
FUNC float sine_wave (float f) {
  float pi = 3.14159265;

  return __sin (f * (((float) STATES) / CLOCK) * 2 * pi);
}