Difference between revisions of "008E"

From GTAMods Wiki
Jump to navigation Jump to search
(updating page)
 
Line 1: Line 1:
{{Icon|trilogy}}
+
{{Icon|trilogy}} '''CSET_LVAR_INT_TO_VAR_FLOAT'''
 
<hr />
 
<hr />
 
'''Description'''
 
'''Description'''
: Converts a global variable floating-point value to an integer and stores it to a local variable
+
: Converts the floating-point value of the global variable to an equivalent integer value and stores the result into the local variable.
 
'''Syntax'''
 
'''Syntax'''
: 008E: [''local var int''] = float_to_integer [''global var flt'']
+
: 008E: [''local var''] = float_to_integer [''global var'']
: 008E: [''local var int''] = float [''global var flt''] to_integer
 
 
'''Parameter'''
 
'''Parameter'''
: [''local var int'']
+
: [''local var'']
:: Local variable to store the converted integer value
+
:: Local variable
: [''global var flt'']
+
: [''global var'']
:: Global variable to pass a floating-point value
+
:: Global variable
 +
 
 +
This opcode truncates a floating-point value of the global variable and stores its integral part into the local variable. For example, converting a value of 4.1 or 4.9 both produces 4 as a result.
  
 
== Keywords ==
 
== Keywords ==
math, conversion, float, integer
+
convert, global, local, variable, int, float, [[math]]
  
 
== See also ==
 
== See also ==
* [[008C]] &ndash; converts global var flt to global var int
+
* [[008C]] &ndash; convert global float to global int
* [[0090]] &ndash; converts local var flt to global var int
+
* [[008D]] &ndash; convert global int to global float
* [[0092]] &ndash; converts local var flt to local var int
+
* [[008F]] &ndash; convert global int to local float
 +
* [[0090]] &ndash; convert local float to global int
 +
* [[0091]] &ndash; convert local int to global float
 +
* [[0092]] &ndash; convert local float to local int
 +
* [[0093]] &ndash; convert local int to local float
  
[[Category:OpCodes]][[Category:Math_OpCodes]]
+
[[Category:OpCodes]][[Category:Math OpCodes]]

Latest revision as of 17:09, 1 August 2015

GTA III Vice City San Andreas CSET_LVAR_INT_TO_VAR_FLOAT


Description

Converts the floating-point value of the global variable to an equivalent integer value and stores the result into the local variable.

Syntax

008E: [local var] = float_to_integer [global var]

Parameter

[local var]
Local variable
[global var]
Global variable

This opcode truncates a floating-point value of the global variable and stores its integral part into the local variable. For example, converting a value of 4.1 or 4.9 both produces 4 as a result.

Keywords

convert, global, local, variable, int, float, math

See also

  • 008C – convert global float to global int
  • 008D – convert global int to global float
  • 008F – convert global int to local float
  • 0090 – convert local float to global int
  • 0091 – convert local int to global float
  • 0092 – convert local float to local int
  • 0093 – convert local int to local float