sin_ - gehrigwilcox/C-Standard-Library GitHub Wiki

Sin(θ)

Sine is the y position on the unit circle for a given angle.

We need some way of calculating sine. Trig functions are extremely difficult to calculate individually, but they all relate to each other in some way. Luckily, sine is cosine shifted to the right a quarter of a circle.

This is super easy. Mathematically,

In C:

return cos(x-M_PI/2);
⚠️ **GitHub.com Fallback** ⚠️