Difference between revisions of "Cos"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>TheImperialDragon
m
imported>Timeslip
(now accepts degrees instead of radians)
Line 14: Line 14:
==Notes==
==Notes==


*At present, all OBSE trigonometric functions take radians, not degrees. To convert an angle in degrees to radians, use this:<pre>set radians to ( 3.14 * ( degrees / 180 ) )</pre>
*From v0005, all OBSE trigonometric functions take and return degrees. Versions of the functions which accept radians are still available by prefixing the function name with an r. (i.e. rcos)
*This function can be used in a mathematical formula (a + cos b), but a mathematical formula will not compile as the arguement for this function (cos (a + b) doesn't work).
*This function can be used in a mathematical formula (a + cos b), but a mathematical formula will not compile as the arguement for this function (cos (a + b) doesn't work).
*cos a + b = ( cos a ) + b
*cos a + b = ( cos a ) + b

Revision as of 08:09, 9 August 2006

A command for Oblivion Script Extender

More widely known as the "COSINE" function.

Syntax:

cos [float]

Returns the cosine of the angle.

Example

set x to r * ( cos theta )

Notes

  • From v0005, all OBSE trigonometric functions take and return degrees. Versions of the functions which accept radians are still available by prefixing the function name with an r. (i.e. rcos)
  • This function can be used in a mathematical formula (a + cos b), but a mathematical formula will not compile as the arguement for this function (cos (a + b) doesn't work).
  • cos a + b = ( cos a ) + b

See Also