UE2:Object static native functions (UT2004): Difference between revisions
Auto-generated page |
first pass |
||
Line 3: | Line 3: | ||
| part = static native functions | | part = static native functions | ||
}} | }} | ||
{{ | ==Math 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''')}} | ||
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]] '''Acos''' ([[float]] '''A''')}} | {{code|native static final function [[float]] '''Acos''' ([[float]] '''A''')}} | ||
Calculates the [[wp:arccos|arccos]] of ''A''. | |||
====Asin==== | ====Asin==== | ||
{{code|native static final function [[float]] '''Asin''' ([[float]] '''A''')}} | {{code|native static final function [[float]] '''Asin''' ([[float]] '''A''')}} | ||
Calculates the [[wp:arcsin|arcsin]] of ''A''. | |||
====Atan==== | ====Atan==== | ||
{{code|native(190) static final function [[float]] '''Atan''' ([[float]] '''A''', [[float]] '''B''')}} | {{code|native(190) static final function [[float]] '''Atan''' ([[float]] '''A''', [[float]] '''B''')}} | ||
< | Calculates [[wp:atan2|atan2]] for the arguments ''A'' and ''B''. | ||
====Ceil==== | |||
{{code|native(253) static final function [[float]] '''Ceil''' ([[float]] '''A''')}} | |||
Returns the smallest integer number greater than or equal to ''A''. | |||
====Cos==== | |||
{{code|native(188) static final function [[float]] '''Cos''' ([[float]] '''A''')}} | |||
Calculates the [[wp:cosine|cosine]] of ''A''. | |||
====Exp==== | |||
{{code|native(191) static final function [[float]] '''Exp''' ([[float]] '''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]] '''FClamp''' ([[float]] '''V''', [[float]] '''A''', [[float]] '''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]] '''FMax''' ([[float]] '''A''', [[float]] '''B''')}} | |||
Returns the larger of the two values. | |||
====FMin==== | |||
{{code|native(244) static final function [[float]] '''FMin''' ([[float]] '''A''', [[float]] '''B''')}} | |||
Returns the smallerof the two values. | |||
====Loge==== | |||
{{code|native(192) static final function [[float]] '''Loge''' ([[float]] '''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]] '''Round''' ([[float]] '''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]] '''Sin''' ([[float]] '''A''')}} | |||
Calculates the [[wp:sine|sine]] of ''A''. | |||
==== | ====Sqrt==== | ||
{{code|native( | {{code|native(193) static final function [[float]] '''Sqrt''' ([[float]] '''A''')}} | ||
Calculates the [[wp:square root|square root]] of ''A''. | |||
==== | ====Square==== | ||
{{code|native( | {{code|native(194) static final function [[float]] '''Square''' ([[float]] '''A''')}} | ||
Calculates ''A'' * ''A'', i.e. ''A'' [[wp:squared|squared]]. | |||
==== | ====Tan==== | ||
{{code|native( | {{code|native(189) static final function [[float]] '''Tan''' ([[float]] '''A''')}} | ||
Calculates the [[wp:Trigonometric functions|tangent]] of ''A''. | |||
==== | ==Random numbers== | ||
{{code|native( | ====FRand==== | ||
{{code|native(195) static final function [[float]] '''FRand''' ()}} | |||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ====Rand==== | ||
{{code|native( | {{code|native(167) static final function [[int]] '''Rand''' ([[int]] '''Max''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ====RotRand==== | ||
{{code|native( | {{code|native(320) static final function {{tl|Rotator||Object structs}} '''RotRand''' (optional [[bool]] '''bRoll''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ====VRand==== | ||
{{code|native( | {{code|native(252) static final function {{tl|Vector||Object structs}} '''VRand''' ()}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ==Static native functions== | ||
{{code|native static final function | ====Asc==== | ||
{{code|native(237) static final function [[int]] '''Asc''' ([[string]] '''S''')}} | |||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ====Caps==== | ||
{{code|native( | {{code|native(235) static final function [[string]] '''Caps''' (coerce [[string]] '''S''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ====Chr==== | ||
{{code|native( | {{code|native(236) static final function [[string]] '''Chr''' ([[int]] '''i''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ====ClassIsChildOf==== | ||
{{code|native( | {{code|native(258) static final function [[bool]] '''ClassIsChildOf''' ([[Types#Class|Class]] '''TestClass''', [[Types#Class|Class]] '''ParentClass''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ====Divide==== | ||
{{code|native static final function | {{code|native(239) static final function [[bool]] '''Divide''' (coerce [[string]] '''Src''', [[string]] '''Divider''', out [[string]] '''LeftPart''', out [[string]] '''RightPart''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ====DynamicLoadObject==== | ||
{{code|native | {{code|native static final function {{cl|Object}} '''DynamicLoadObject''' ([[string]] '''ObjectName''', [[Types#Class|Class]] '''ObjectClass''', optional [[bool]] '''MayFail''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ====Eval==== | ||
{{code|native( | {{code|native(202) static final function [[string]] '''Eval''' ([[bool]] '''Condition''', coerce [[string]] '''ResultIfTrue''', coerce [[string]] '''ResultIfFalse''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
==== | ====FindObject==== | ||
{{code|native | {{code|native static final function {{cl|Object}} '''FindObject''' ([[string]] '''ObjectName''', [[Types#Class|Class]] '''ObjectClass''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
Line 177: | Line 237: | ||
====Log==== | ====Log==== | ||
{{code|native(231) final static function '''Log''' (coerce [[string]] '''S''', optional [[name]] '''Tag''')}} | {{code|native(231) final static function '''Log''' (coerce [[string]] '''S''', optional [[name]] '''Tag''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
Line 192: | Line 242: | ||
====Mid==== | ====Mid==== | ||
{{code|native(127) static final function [[string]] '''Mid''' (coerce [[string]] '''S''', [[int]] '''i''', optional [[int]] '''j''')}} | {{code|native(127) static final function [[string]] '''Mid''' (coerce [[string]] '''S''', [[int]] '''i''', optional [[int]] '''j''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
Line 257: | Line 302: | ||
====QuatToRotator==== | ====QuatToRotator==== | ||
{{code|native static final function {{tl|Rotator||Object structs}} '''QuatToRotator''' ({{tl|Quat||Object structs}} '''A''')}} | {{code|native static final function {{tl|Rotator||Object structs}} '''QuatToRotator''' ({{tl|Quat||Object structs}} '''A''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
Line 277: | Line 317: | ||
====Right==== | ====Right==== | ||
{{code|native(234) static final function [[string]] '''Right''' (coerce [[string]] '''S''', [[int]] '''i''')}} | {{code|native(234) static final function [[string]] '''Right''' (coerce [[string]] '''S''', [[int]] '''i''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
Line 302: | Line 327: | ||
====Split==== | ====Split==== | ||
{{code|native(240) static final function [[int]] '''Split''' (coerce [[string]] '''Src''', [[string]] '''Divider''', out [[array]]<[[string]]> '''Parts''')}} | {{code|native(240) static final function [[int]] '''Split''' (coerce [[string]] '''Src''', [[string]] '''Divider''', out [[array]]<[[string]]> '''Parts''')}} | ||
<!-- enter function description --> | <!-- enter function description --> | ||
Line 332: | Line 347: | ||
====StrCmp==== | ====StrCmp==== | ||
{{code|native(200) static final function [[int]] '''StrCmp''' (coerce [[string]] '''S''', coerce [[string]] '''T''', optional [[int]] '''Count''', optional [[bool]] '''bCaseSensitive''')}} | {{code|native(200) static final function [[int]] '''StrCmp''' (coerce [[string]] '''S''', coerce [[string]] '''T''', optional [[int]] '''Count''', optional [[bool]] '''bCaseSensitive''')}} | ||
<!-- enter function description --> | <!-- enter function description --> |
Revision as of 03:34, 1 December 2008
![]() |
Object (static native functions) |
- Object static native functions in other games:
- Other member categories for this class:
Math functions
Int functions
Clamp
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
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
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
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
Calculates the arccos of A.
Asin
Calculates the arcsin of A.
Atan
Calculates atan2 for the arguments A and B.
Ceil
Returns the smallest integer number greater than or equal to A.
Cos
Calculates the cosine of A.
Exp
Calculates e to the power of A, the exponential function.
FClamp
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
Returns the larger of the two values.
FMin
Returns the smallerof the two values.
Loge
Calculates the logarithm of A to the base of e, the natural logarithm.
Round
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
Calculates the sine of A.
Sqrt
Calculates the square root of A.
Square
Calculates A * A, i.e. A squared.
Tan
Calculates the tangent of A.
Random numbers
FRand
Rand
RotRand
VRand
Static native functions
Asc
Caps
Chr
ClassIsChildOf
Divide
DynamicLoadObject
Eval
FindObject
GetAxes
GetEnum
GetPerObjectNames
GetUnAxes
InStr
InterpCurveEval
InterpCurveGetInputDomain
InterpCurveGetOutputRange
Invert
Left
Len
Lerp
Localize
Locs
Log
Mid
MirrorVectorByNormal
Normal
Normalize
OrthoRotation
QuatFindBetween
QuatFromAxisAndAngle
QuatFromRotator
QuatInvert
QuatProduct
QuatRotateVector
QuatSlerp
QuatToRotator
Repl
ResetConfig
Right
Smerp
Split
StaticClearConfig
StaticSaveConfig
StopWatch
StrCmp
VSize
Warn