Jump to content

Ssin(): Difference between revisions

From OpenBOR
No edit summary
No edit summary
 
Line 1: Line 1:
Accepts a floating-point angle in degrees and calculates its sine using the C <code>sin() function: sin(input × π / 180)</code>.
Accepts a floating-point angle in degrees and calculates its sine using the C <code>sin()</code> function: <code>sin(input * π / 180)</code>.


For integer angles, use <code>sin()</code> instead to take advantage of its lookup table.<syntaxhighlight lang="c" line="1">
For integer angles, use [[sin()]] instead to take advantage of its faster lookup table.<syntaxhighlight lang="c" line="1">
float input = 1.0;  // Example input angle in degrees
float input = 1.0;  // Example input angle in degrees



Latest revision as of 12:57, 21 July 2026

Accepts a floating-point angle in degrees and calculates its sine using the C sin() function: sin(input * π / 180).

For integer angles, use sin() instead to take advantage of its faster lookup table.

float input = 1.0;  // Example input angle in degrees

float result = ssin(input); 

// result = 0.017452406