Difference between revisions of "Cos"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Kkuhlmann
 
imported>Ez0n3
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=='''Description'''==
{{Function
 
|origin = GECK1
'''Cos''' When given degrees returns the cosine of a given angle.
|summary = When given degrees returns the cosine of a given angle.
 
|name = Cos
=='''Syntax'''==
|arguments =
 
  {{FunctionArgument
   cos x     ''will return the cosine of x degrees''
  |Name = x
 
  |Type = float
  cos x 1  ''will return the arccosine of x in degrees – note the optional 1 indicating arc-.''
  }}{{FunctionArgument
 
  |Name = Arc
 
  |Type = int (optional)
 
  |Optional = y
 
   }}
=='''Examples'''==
|example = set x to player.[[GetAngle]] X
 
 
cos x   ;''will return the cosine of x degrees''
 
=='''Notes'''==
cos x 1  ;''will return the arccosine of x in degrees – note the optional 1 indicating arc-.''
Sin, cos, tan, pow, log, and abs (particularly pow and log) are extremely slow. Do not use them in script blocks that get executed every frame.
}}
 
 
=='''See Also'''==
[[Sin]], [[Log]], [[Tan]], [[Pow]] and [[Abs]]
 
=='''Reference'''==


==Notes==
*Sin, cos, tan, pow, log, and abs (particularly pow and log) are extremely slow. Do not use them in script blocks that get executed every frame.
*This function is new in the GECK, and was not available in the TES4 Construction Set. However, it was available through the OBSE script extender.


==See Also==
*[[Abs]]
*[[Log]]
*[[Pow]]
*[[Sin]]
*[[Tan]]
*Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/Acos Acos (OBSE function)]
*Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/Cos Cos (OBSE function)]


[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (GECK 1.1)]]
[[Category:Math Functions]]
[[Category:Math Functions]]
[[Category:Math Functions (GECK 1.1)]]

Latest revision as of 06:18, 15 January 2011

< [[::Category:Functions|Category:Functions]]

A function included in the GECK version 1.1.0.36.

Description

When given degrees returns the cosine of a given angle.

Syntax

[help]
Cos x:float Arc:int (optional)

Example

set x to player.GetAngle X

cos x    ;will return the cosine of x degrees

cos x 1  ;will return the arccosine of x in degrees – note the optional 1 indicating arc-.

Notes

  • Sin, cos, tan, pow, log, and abs (particularly pow and log) are extremely slow. Do not use them in script blocks that get executed every frame.
  • This function is new in the GECK, and was not available in the TES4 Construction Set. However, it was available through the OBSE script extender.

See Also