Jump to content

Scos()

From OpenBOR
Revision as of 14:32, 21 July 2026 by Dcurrent (talk | contribs) (Created page with "Accepts a floating-point angle in degrees and calculates its sine using the C <code>cos()</code> function: <code>cos(input * π / 180)</code>. For integer angles, use cos() instead to take advantage of its faster lookup table.<syntaxhighlight lang="c" line="1"> float input = 1.0; // Example input angle in degrees float result = scos(input); // result = 0.999847695 </syntaxhighlight> Category:OpenBOR Index Category:Script Functions Category:Math")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

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

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

float result = scos(input);

// result = 0.999847695