Jump to content

Ssin(): Difference between revisions

From OpenBOR
Created page with "Accepts a floating input angle and applies the C <code>sin()</code> function as follows: <code>sin({input} * 3.14159265 / 180.0)</code>. For acquiring sine from integer angles, use the sin() function instead. <syntaxhighlight lang="c" line="1"> float input = 1.0; // Example input angle in degrees float result = ssin(input); // result = 0.017452406 </syntaxhighlight> Category:OpenBOR Index Category:Script Functions Category:Math"
 
No edit summary
Line 1: Line 1:
Accepts a floating input angle and applies the C <code>sin()</code> function as follows: <code>sin({input} * 3.14159265 / 180.0)</code>. For acquiring sine from integer angles, use the [[Sin()​|sin()]] function instead. <syntaxhighlight lang="c" line="1">
Accepts a floating-point angle in degrees and calculates its sine using the C <code>sin() function: sin(input × π / 180)</code>.
 
For integer angles, use <code>sin()</code> instead to take advantage of its 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



Revision as of 12:55, 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 lookup table.

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

float result = ssin(input); 

// result = 0.017452406