Difference between revisions of "Abs"

From GECK

m (Notes: there's no way abs can be fubared into a slow function)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=='''Description'''==
+
{{Function
 
+
|origin = GECK1
'''Abs''' When given a number returns the absolute value of the number.
+
|summary = When given a number, returns the absolute value of the number.
 
+
|name = Abs
=='''Syntax'''==
+
|returnType = int
 
+
|arguments =  
  abs x     ''will return the absolute value of x.''
+
  {{FunctionArgument
 
+
  |Name = x
 
+
  |Type = int
 
+
  }}
 
+
|example = abs x
=='''Examples'''==
+
Will return the absolute value of x.
 
+
}}
 
+
 
+
=='''Notes'''==
+
Sin, cos, tan, pow, and log (particularly pow and log) are extremely slow. Do not use them in script blocks that get executed every frame.
+
 
+
=='''See Also'''==
+
[[Sin]], [[Cos]], [[Tan]], [[Log]] and [[Pow]]
+
 
+
=='''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==
 +
*[[Cos]]
 +
*[[Log]]
 +
*[[Pow]]
 +
*[[Sin]]
 +
*[[Tan]]
 +
*Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/Abs Abs (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 23:29, 12 January 2011

A function included in the GECK version 1.1.0.36.

Description

When given a number, returns the absolute value of the number.

Syntax

(int) Abs x:int

Example

abs x

Will return the absolute value of x.

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

Personal tools