Jump to content

Acos(): Difference between revisions

From OpenBOR
Created page with "Accepts a decimal value and returns its arc cosine in degrees using the C <code>acos()</code> function: <code>acos(input) * 180 / π</code>. Valid arc-cosine inputs range from <code>-1</code> to <code>1</code>. Values outside this range are clamped to the nearest limit.<syntaxhighlight lang="c" line="1"> float input = 0.5; float result = acos(input); // result = 60.0 </syntaxhighlight>"
 
No edit summary
 
Line 8: Line 8:
// result = 60.0
// result = 60.0
</syntaxhighlight>
</syntaxhighlight>
[[Category:OpenBOR Index]]
[[Category:Script Functions]]
[[Category:Math]]

Latest revision as of 14:49, 21 July 2026

Accepts a decimal value and returns its arc cosine in degrees using the C acos() function: acos(input) * 180 / π.

Valid arc-cosine inputs range from -1 to 1. Values outside this range are clamped to the nearest limit.

float input = 0.5;

float result = acos(input);

// result = 60.0