Go back to
Richel Bilderbeek's homepage.
Go back to
Richel Bilderbeek's C++ page.
Standard function
for calculating the sine of an
angle, where the angle is in radians.
To use std::sin , the STL header
file cmath.h must be #include d.
#include <cmath>
#include <cassert>
int main ()
{
const
double x = 0.5 * M_PI;
const
double y = std::sin(x);
assert(y
== 1.0);
}
Internal links
Sine class that uses a
look-up table to calculate a sine
Sine approximation by using a parabola
External links
Boost string algorithms
[0]
None
Go back to
Richel Bilderbeek's C++ page.
Go back to
Richel Bilderbeek's homepage.