UE2:Object static native functions (UT2004): Difference between revisions

From Unreal Wiki, The Unreal Engine Documentation Site
Auto-generated page
 
first pass
Line 3: Line 3:
| part = static native functions
| part = static native functions
}}
}}
{{autogenerated}}
==Math functions==
==Static native functions==
===Int functions===
====Clamp====
{{code|native(251) static final function [[int]] '''Clamp''' ([[int]] '''V''', [[int]] '''A''', [[int]] '''B''')}}
 
Limits ''V'' to the [[wp:interval (mathematics)|interval]] of [''A'', ''B'']. Exactly speaking, ''A'' will be returned if ''V'' is smaller than ''A'', ''B'' will be returned if ''V'' is larger than ''B'', otherwise ''V'' is returned.
 
This also applies if ''A'' is larger than ''B''. So if ''V'' is larger than ''B'', but smaller than ''A'', the value of ''A'' is returned even though ''V'' is actually between the two values.
 
====Max====
{{code|native(250) static final function [[int]] '''Max''' ([[int]] '''A''', [[int]] '''B''')}}
 
Returns the larger of the two values. Note that when passing [[float]] parameters to this function, they are automatically [[typecast]]ed to type ''int''. If you don't want this, use the {{tl|FMax}}() function instead.
 
====Min====
{{code|native(249) static final function [[int]] '''Min''' ([[int]] '''A''', [[int]] '''B''')}}
 
Returns the smaller of the two values. Note that when passing [[float]] parameters to this function, they are automatically [[typecast]]ed to type ''int''. If you don't want this, use the {{tl|FMin}}() function instead.
 
===Float functions===
====Abs====
====Abs====
{{code|native(186) static final function [[float]] '''Abs''' ([[float]] '''A''')}}
{{code|native(186) static final function [[float]] '''Abs''' ([[float]] '''A''')}}


<!-- enter function description -->
Returns the [[wp:absolute value|absolute value]] of ''A''. That means, if ''A'' is greater than or equal to zero, it is returned unchanged. Otherwise, if ''A'' is less than zero, -''A'' is returned.


====Acos====
====Acos====
{{code|native static final function [[float]]&nbsp;'''Acos''' ([[float]]&nbsp;'''A''')}}
{{code|native static final function [[float]]&nbsp;'''Acos''' ([[float]]&nbsp;'''A''')}}


<!-- enter function description -->
Calculates the [[wp:arccos|arccos]] of ''A''.
 
====Asc====
{{code|native(237) static final function [[int]]&nbsp;'''Asc''' ([[string]]&nbsp;'''S''')}}
 
<!-- enter function description -->


====Asin====
====Asin====
{{code|native static final function [[float]]&nbsp;'''Asin''' ([[float]]&nbsp;'''A''')}}
{{code|native static final function [[float]]&nbsp;'''Asin''' ([[float]]&nbsp;'''A''')}}


<!-- enter function description -->
Calculates the [[wp:arcsin|arcsin]] of ''A''.


====Atan====
====Atan====
{{code|native(190) static final function [[float]]&nbsp;'''Atan''' ([[float]]&nbsp;'''A''', [[float]]&nbsp;'''B''')}}
{{code|native(190) static final function [[float]]&nbsp;'''Atan''' ([[float]]&nbsp;'''A''', [[float]]&nbsp;'''B''')}}


<!-- enter function description -->
Calculates [[wp:atan2|atan2]] for the arguments ''A'' and ''B''.
 
====Ceil====
{{code|native(253) static final function [[float]]&nbsp;'''Ceil''' ([[float]]&nbsp;'''A''')}}
 
Returns the smallest integer number greater than or equal to ''A''.
 
====Cos====
{{code|native(188) static final function [[float]]&nbsp;'''Cos''' ([[float]]&nbsp;'''A''')}}
 
Calculates the [[wp:cosine|cosine]] of ''A''.
 
====Exp====
{{code|native(191) static final function [[float]]&nbsp;'''Exp''' ([[float]]&nbsp;'''A''')}}
 
Calculates [[wp:e (mathematical constant)|e]] to the power of ''A'', the [[wp:exponential function|exponential function]].
 
====FClamp====
{{code|native(246) static final function [[float]]&nbsp;'''FClamp''' ([[float]]&nbsp;'''V''', [[float]]&nbsp;'''A''', [[float]]&nbsp;'''B''')}}
 
Limits ''V'' to the [[wp:interval (mathematics)|interval]] of [''A'', ''B'']. Exactly speaking, ''A'' will be returned if ''V'' is smaller than ''A'', ''B'' will be returned if ''V'' is larger than ''B'', otherwise ''V'' is returned.
 
====FMax====
{{code|native(245) static final function [[float]]&nbsp;'''FMax''' ([[float]]&nbsp;'''A''', [[float]]&nbsp;'''B''')}}
 
Returns the larger of the two values.
 
====FMin====
{{code|native(244) static final function [[float]]&nbsp;'''FMin''' ([[float]]&nbsp;'''A''', [[float]]&nbsp;'''B''')}}
 
Returns the smallerof the two values.
 
====Loge====
{{code|native(192) static final function [[float]]&nbsp;'''Loge''' ([[float]]&nbsp;'''A''')}}
 
Calculates the [[wp:logarithm|logarithm]] of ''A'' to the base of [[wp:e (mathematical constant)|e]], the [[wp:natural logarithm|natural logarithm]].
 
====Round====
{{code|native(257) static final function [[float]]&nbsp;'''Round''' ([[float]]&nbsp;'''A''')}}
 
Rounds ''A'' to the nearest integer number. If the decimal part of ''A'' is <code>.5</code> or larger, the smallest integer number greater than ''A'' is returned, otherwise the largest integer number less than or equal too ''A'' is returned.
 
====Sin====
{{code|native(187) static final function [[float]]&nbsp;'''Sin''' ([[float]]&nbsp;'''A''')}}
 
Calculates the [[wp:sine|sine]] of ''A''.


====Caps====
====Sqrt====
{{code|native(235) static final function [[string]]&nbsp;'''Caps''' (coerce&nbsp;[[string]]&nbsp;'''S''')}}
{{code|native(193) static final function [[float]]&nbsp;'''Sqrt''' ([[float]]&nbsp;'''A''')}}


<!-- enter function description -->
Calculates the [[wp:square root|square root]] of ''A''.


====Ceil====
====Square====
{{code|native(253) static final function [[float]]&nbsp;'''Ceil''' ([[float]]&nbsp;'''A''')}}
{{code|native(194) static final function [[float]]&nbsp;'''Square''' ([[float]]&nbsp;'''A''')}}


<!-- enter function description -->
Calculates ''A'' * ''A'', i.e. ''A'' [[wp:squared|squared]].


====Chr====
====Tan====
{{code|native(236) static final function [[string]]&nbsp;'''Chr''' ([[int]]&nbsp;'''i''')}}
{{code|native(189) static final function [[float]]&nbsp;'''Tan''' ([[float]]&nbsp;'''A''')}}


<!-- enter function description -->
Calculates the [[wp:Trigonometric functions|tangent]] of ''A''.


====Clamp====
==Random numbers==
{{code|native(251) static final function [[int]]&nbsp;'''Clamp''' ([[int]]&nbsp;'''V''', [[int]]&nbsp;'''A''', [[int]]&nbsp;'''B''')}}
====FRand====
{{code|native(195) static final function [[float]]&nbsp;'''FRand''' ()}}


<!-- enter function description -->
<!-- enter function description -->


====ClassIsChildOf====
====Rand====
{{code|native(258) static final function [[bool]]&nbsp;'''ClassIsChildOf''' ([[Types#Class|Class]]&nbsp;'''TestClass''', [[Types#Class|Class]]&nbsp;'''ParentClass''')}}
{{code|native(167) static final function [[int]]&nbsp;'''Rand''' ([[int]]&nbsp;'''Max''')}}


<!-- enter function description -->
<!-- enter function description -->


====Cos====
====RotRand====
{{code|native(188) static final function [[float]]&nbsp;'''Cos''' ([[float]]&nbsp;'''A''')}}
{{code|native(320) static final function {{tl|Rotator||Object structs}}&nbsp;'''RotRand''' (optional&nbsp;[[bool]]&nbsp;'''bRoll''')}}


<!-- enter function description -->
<!-- enter function description -->


====Divide====
====VRand====
{{code|native(239) static final function [[bool]]&nbsp;'''Divide''' (coerce&nbsp;[[string]]&nbsp;'''Src''', [[string]]&nbsp;'''Divider''', out&nbsp;[[string]]&nbsp;'''LeftPart''', out&nbsp;[[string]]&nbsp;'''RightPart''')}}
{{code|native(252) static final function {{tl|Vector||Object structs}}&nbsp;'''VRand''' ()}}


<!-- enter function description -->
<!-- enter function description -->


====DynamicLoadObject====
==Static native functions==
{{code|native static final function {{cl|Object}}&nbsp;'''DynamicLoadObject''' ([[string]]&nbsp;'''ObjectName''', [[Types#Class|Class]]&nbsp;'''ObjectClass''', optional&nbsp;[[bool]]&nbsp;'''MayFail''')}}
====Asc====
{{code|native(237) static final function [[int]]&nbsp;'''Asc''' ([[string]]&nbsp;'''S''')}}


<!-- enter function description -->
<!-- enter function description -->


====Eval====
====Caps====
{{code|native(202) static final function [[string]]&nbsp;'''Eval''' ([[bool]]&nbsp;'''Condition''', coerce&nbsp;[[string]]&nbsp;'''ResultIfTrue''', coerce&nbsp;[[string]]&nbsp;'''ResultIfFalse''')}}
{{code|native(235) static final function [[string]]&nbsp;'''Caps''' (coerce&nbsp;[[string]]&nbsp;'''S''')}}


<!-- enter function description -->
<!-- enter function description -->


====Exp====
====Chr====
{{code|native(191) static final function [[float]]&nbsp;'''Exp''' ([[float]]&nbsp;'''A''')}}
{{code|native(236) static final function [[string]]&nbsp;'''Chr''' ([[int]]&nbsp;'''i''')}}


<!-- enter function description -->
<!-- enter function description -->


====FClamp====
====ClassIsChildOf====
{{code|native(246) static final function [[float]]&nbsp;'''FClamp''' ([[float]]&nbsp;'''V''', [[float]]&nbsp;'''A''', [[float]]&nbsp;'''B''')}}
{{code|native(258) static final function [[bool]]&nbsp;'''ClassIsChildOf''' ([[Types#Class|Class]]&nbsp;'''TestClass''', [[Types#Class|Class]]&nbsp;'''ParentClass''')}}


<!-- enter function description -->
<!-- enter function description -->


====FindObject====
====Divide====
{{code|native static final function {{cl|Object}}&nbsp;'''FindObject''' ([[string]]&nbsp;'''ObjectName''', [[Types#Class|Class]]&nbsp;'''ObjectClass''')}}
{{code|native(239) static final function [[bool]]&nbsp;'''Divide''' (coerce&nbsp;[[string]]&nbsp;'''Src''', [[string]]&nbsp;'''Divider''', out&nbsp;[[string]]&nbsp;'''LeftPart''', out&nbsp;[[string]]&nbsp;'''RightPart''')}}


<!-- enter function description -->
<!-- enter function description -->


====FMax====
====DynamicLoadObject====
{{code|native(245) static final function [[float]]&nbsp;'''FMax''' ([[float]]&nbsp;'''A''', [[float]]&nbsp;'''B''')}}
{{code|native static final function {{cl|Object}}&nbsp;'''DynamicLoadObject''' ([[string]]&nbsp;'''ObjectName''', [[Types#Class|Class]]&nbsp;'''ObjectClass''', optional&nbsp;[[bool]]&nbsp;'''MayFail''')}}


<!-- enter function description -->
<!-- enter function description -->


====FMin====
====Eval====
{{code|native(244) static final function [[float]]&nbsp;'''FMin''' ([[float]]&nbsp;'''A''', [[float]]&nbsp;'''B''')}}
{{code|native(202) static final function [[string]]&nbsp;'''Eval''' ([[bool]]&nbsp;'''Condition''', coerce&nbsp;[[string]]&nbsp;'''ResultIfTrue''', coerce&nbsp;[[string]]&nbsp;'''ResultIfFalse''')}}


<!-- enter function description -->
<!-- enter function description -->


====FRand====
====FindObject====
{{code|native(195) static final function [[float]]&nbsp;'''FRand''' ()}}
{{code|native static final function {{cl|Object}}&nbsp;'''FindObject''' ([[string]]&nbsp;'''ObjectName''', [[Types#Class|Class]]&nbsp;'''ObjectClass''')}}


<!-- enter function description -->
<!-- enter function description -->
Line 177: Line 237:
====Log====
====Log====
{{code|native(231) final static function '''Log''' (coerce&nbsp;[[string]]&nbsp;'''S''', optional&nbsp;[[name]]&nbsp;'''Tag''')}}
{{code|native(231) final static function '''Log''' (coerce&nbsp;[[string]]&nbsp;'''S''', optional&nbsp;[[name]]&nbsp;'''Tag''')}}
<!-- enter function description -->
====Loge====
{{code|native(192) static final function [[float]]&nbsp;'''Loge''' ([[float]]&nbsp;'''A''')}}
<!-- enter function description -->
====Max====
{{code|native(250) static final function [[int]]&nbsp;'''Max''' ([[int]]&nbsp;'''A''', [[int]]&nbsp;'''B''')}}


<!-- enter function description -->
<!-- enter function description -->
Line 192: Line 242:
====Mid====
====Mid====
{{code|native(127) static final function [[string]]&nbsp;'''Mid''' (coerce&nbsp;[[string]]&nbsp;'''S''', [[int]]&nbsp;'''i''', optional&nbsp;[[int]]&nbsp;'''j''')}}
{{code|native(127) static final function [[string]]&nbsp;'''Mid''' (coerce&nbsp;[[string]]&nbsp;'''S''', [[int]]&nbsp;'''i''', optional&nbsp;[[int]]&nbsp;'''j''')}}
<!-- enter function description -->
====Min====
{{code|native(249) static final function [[int]]&nbsp;'''Min''' ([[int]]&nbsp;'''A''', [[int]]&nbsp;'''B''')}}


<!-- enter function description -->
<!-- enter function description -->
Line 257: Line 302:
====QuatToRotator====
====QuatToRotator====
{{code|native static final function {{tl|Rotator||Object structs}}&nbsp;'''QuatToRotator''' ({{tl|Quat||Object structs}}&nbsp;'''A''')}}
{{code|native static final function {{tl|Rotator||Object structs}}&nbsp;'''QuatToRotator''' ({{tl|Quat||Object structs}}&nbsp;'''A''')}}
<!-- enter function description -->
====Rand====
{{code|native(167) static final function [[int]]&nbsp;'''Rand''' ([[int]]&nbsp;'''Max''')}}


<!-- enter function description -->
<!-- enter function description -->
Line 277: Line 317:
====Right====
====Right====
{{code|native(234) static final function [[string]]&nbsp;'''Right''' (coerce&nbsp;[[string]]&nbsp;'''S''', [[int]]&nbsp;'''i''')}}
{{code|native(234) static final function [[string]]&nbsp;'''Right''' (coerce&nbsp;[[string]]&nbsp;'''S''', [[int]]&nbsp;'''i''')}}
<!-- enter function description -->
====RotRand====
{{code|native(320) static final function {{tl|Rotator||Object structs}}&nbsp;'''RotRand''' (optional&nbsp;[[bool]]&nbsp;'''bRoll''')}}
<!-- enter function description -->
====Round====
{{code|native(257) static final function [[float]]&nbsp;'''Round''' ([[float]]&nbsp;'''A''')}}
<!-- enter function description -->
====Sin====
{{code|native(187) static final function [[float]]&nbsp;'''Sin''' ([[float]]&nbsp;'''A''')}}


<!-- enter function description -->
<!-- enter function description -->
Line 302: Line 327:
====Split====
====Split====
{{code|native(240) static final function [[int]]&nbsp;'''Split''' (coerce&nbsp;[[string]]&nbsp;'''Src''', [[string]]&nbsp;'''Divider''', out&nbsp;[[array]]<[[string]]>&nbsp;'''Parts''')}}
{{code|native(240) static final function [[int]]&nbsp;'''Split''' (coerce&nbsp;[[string]]&nbsp;'''Src''', [[string]]&nbsp;'''Divider''', out&nbsp;[[array]]<[[string]]>&nbsp;'''Parts''')}}
<!-- enter function description -->
====Sqrt====
{{code|native(193) static final function [[float]]&nbsp;'''Sqrt''' ([[float]]&nbsp;'''A''')}}
<!-- enter function description -->
====Square====
{{code|native(194) static final function [[float]]&nbsp;'''Square''' ([[float]]&nbsp;'''A''')}}


<!-- enter function description -->
<!-- enter function description -->
Line 332: Line 347:
====StrCmp====
====StrCmp====
{{code|native(200) static final function [[int]]&nbsp;'''StrCmp''' (coerce&nbsp;[[string]]&nbsp;'''S''', coerce&nbsp;[[string]]&nbsp;'''T''', optional&nbsp;[[int]]&nbsp;'''Count''', optional&nbsp;[[bool]]&nbsp;'''bCaseSensitive''')}}
{{code|native(200) static final function [[int]]&nbsp;'''StrCmp''' (coerce&nbsp;[[string]]&nbsp;'''S''', coerce&nbsp;[[string]]&nbsp;'''T''', optional&nbsp;[[int]]&nbsp;'''Count''', optional&nbsp;[[bool]]&nbsp;'''bCaseSensitive''')}}
<!-- enter function description -->
====Tan====
{{code|native(189) static final function [[float]]&nbsp;'''Tan''' ([[float]]&nbsp;'''A''')}}
<!-- enter function description -->
====VRand====
{{code|native(252) static final function {{tl|Vector||Object structs}}&nbsp;'''VRand''' ()}}


<!-- enter function description -->
<!-- enter function description -->

Revision as of 03:34, 1 December 2008

UT2004 Object (static native functions)
Object static native functions in other games:
Other member categories for this class:

Math functions

Int functions

Clamp

native(251) static final function int Clamp (int V, int A, int B)

Limits V to the interval of [A, B]. Exactly speaking, A will be returned if V is smaller than A, B will be returned if V is larger than B, otherwise V is returned.

This also applies if A is larger than B. So if V is larger than B, but smaller than A, the value of A is returned even though V is actually between the two values.

Max

native(250) static final function int Max (int A, int B)

Returns the larger of the two values. Note that when passing float parameters to this function, they are automatically typecasted to type int. If you don't want this, use the FMax() function instead.

Min

native(249) static final function int Min (int A, int B)

Returns the smaller of the two values. Note that when passing float parameters to this function, they are automatically typecasted to type int. If you don't want this, use the FMin() function instead.

Float functions

Abs

native(186) static final function float Abs (float A)

Returns the absolute value of A. That means, if A is greater than or equal to zero, it is returned unchanged. Otherwise, if A is less than zero, -A is returned.

Acos

native static final function float Acos (float A)

Calculates the arccos of A.

Asin

native static final function float Asin (float A)

Calculates the arcsin of A.

Atan

native(190) static final function float Atan (float A, float B)

Calculates atan2 for the arguments A and B.

Ceil

native(253) static final function float Ceil (float A)

Returns the smallest integer number greater than or equal to A.

Cos

native(188) static final function float Cos (float A)

Calculates the cosine of A.

Exp

native(191) static final function float Exp (float A)

Calculates e to the power of A, the exponential function.

FClamp

native(246) static final function float FClamp (float V, float A, float B)

Limits V to the interval of [A, B]. Exactly speaking, A will be returned if V is smaller than A, B will be returned if V is larger than B, otherwise V is returned.

FMax

native(245) static final function float FMax (float A, float B)

Returns the larger of the two values.

FMin

native(244) static final function float FMin (float A, float B)

Returns the smallerof the two values.

Loge

native(192) static final function float Loge (float A)

Calculates the logarithm of A to the base of e, the natural logarithm.

Round

native(257) static final function float Round (float A)

Rounds A to the nearest integer number. If the decimal part of A is .5 or larger, the smallest integer number greater than A is returned, otherwise the largest integer number less than or equal too A is returned.

Sin

native(187) static final function float Sin (float A)

Calculates the sine of A.

Sqrt

native(193) static final function float Sqrt (float A)

Calculates the square root of A.

Square

native(194) static final function float Square (float A)

Calculates A * A, i.e. A squared.

Tan

native(189) static final function float Tan (float A)

Calculates the tangent of A.

Random numbers

FRand

native(195) static final function float FRand ()


Rand

native(167) static final function int Rand (int Max)


RotRand

native(320) static final function Rotator RotRand (optional bool bRoll)


VRand

native(252) static final function Vector VRand ()


Static native functions

Asc

native(237) static final function int Asc (string S)


Caps

native(235) static final function string Caps (coerce string S)


Chr

native(236) static final function string Chr (int i)


ClassIsChildOf

native(258) static final function bool ClassIsChildOf (Class TestClass, Class ParentClass)


Divide

native(239) static final function bool Divide (coerce string Src, string Divider, out string LeftPart, out string RightPart)


DynamicLoadObject

native static final function Object DynamicLoadObject (string ObjectName, Class ObjectClass, optional bool MayFail)


Eval

native(202) static final function string Eval (bool Condition, coerce string ResultIfTrue, coerce string ResultIfFalse)


FindObject

native static final function Object FindObject (string ObjectName, Class ObjectClass)


GetAxes

native(229) static final function GetAxes (Rotator A, out Vector X, out Vector Y, out Vector Z)


GetEnum

native static final function name GetEnum (Object E, coerce int i)


GetPerObjectNames

native static final function array<stringGetPerObjectNames (string ININame, optional string ObjectClass, optional int MaxResults)


GetUnAxes

native(230) static final function GetUnAxes (Rotator A, out Vector X, out Vector Y, out Vector Z)


InStr

native(126) static final function int InStr (coerce string S, coerce string t)


InterpCurveEval

native static final function float InterpCurveEval (InterpCurve curve, float input)


InterpCurveGetInputDomain

native static final function InterpCurveGetInputDomain (InterpCurve curve, out float min, out float max)


InterpCurveGetOutputRange

native static final function InterpCurveGetOutputRange (InterpCurve curve, out float min, out float max)


Invert

native(227) static final function Invert (out Vector X, out Vector Y, out Vector Z)


Left

native(128) static final function string Left (coerce string S, int i)


Len

native(125) static final function int Len (coerce string S)


Lerp

native(247) static final function float Lerp (float Alpha, float A, float B, optional bool bClampRange)


Localize

native static function string Localize (string SectionName, string KeyName, string PackageName)


Locs

native(238) static final function string Locs (coerce string S)


Log

native(231) final static function Log (coerce string S, optional name Tag)


Mid

native(127) static final function string Mid (coerce string S, int i, optional int j)


MirrorVectorByNormal

native(300) static final function Vector MirrorVectorByNormal (Vector Vect, Vector Normal)


Normal

native(226) static final function Vector Normal (Vector A)


Normalize

native static final function Rotator Normalize (Rotator Rot)


OrthoRotation

native static final function Rotator OrthoRotation (Vector X, Vector Y, Vector Z)


QuatFindBetween

native static final function Quat QuatFindBetween (Vector A, Vector B)


QuatFromAxisAndAngle

native static final function Quat QuatFromAxisAndAngle (Vector Axis, float Angle)


QuatFromRotator

native static final function Quat QuatFromRotator (Rotator A)


QuatInvert

native static final function Quat QuatInvert (Quat A)


QuatProduct

native static final function Quat QuatProduct (Quat A, Quat B)


QuatRotateVector

native static final function Vector QuatRotateVector (Quat A, Vector B)


QuatSlerp

native static final function Quat QuatSlerp (Quat A, Quat B, float Slerp)


QuatToRotator

native static final function Rotator QuatToRotator (Quat A)


Repl

native(201) static final function string Repl (coerce string Src, coerce string Match, coerce string With, optional bool bCaseSensitive)


ResetConfig

native static final function ResetConfig (optional string PropName)


Right

native(234) static final function string Right (coerce string S, int i)


Smerp

native(248) static final function float Smerp (float Alpha, float A, float B)


Split

native(240) static final function int Split (coerce string Src, string Divider, out array<stringParts)


StaticClearConfig

native static final function StaticClearConfig (optional string PropName)


StaticSaveConfig

native static final function StaticSaveConfig ()


StopWatch

native(535) static final function StopWatch (optional bool bStop)


StrCmp

native(200) static final function int StrCmp (coerce string S, coerce string T, optional int Count, optional bool bCaseSensitive)


VSize

native(225) static final function float VSize (Vector A)


Warn

native(232) final static function Warn (coerce string S)