Difference between revisions of "02F6"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with "{{Icon|trilogy}} '''SIN''' <hr /> '''Description''' : Takes the sine of the floating-point value '''Syntax''' : 02F6: [''var''] = sine [''flt''] '''Parameter''' : [''var''] ::...")
 
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Icon|trilogy}} '''SIN'''
+
{{OpCode
<hr />
+
| games      = {{Icon|t}}
'''Description'''
+
| command    = SIN
: Takes the sine of the floating-point value
+
| description = Takes the sine of the floating-point value
'''Syntax'''
+
| syntax1    = 02F6: [''var''] = sine [''flt'']
: 02F6: [''var''] = sine [''flt'']
+
| p1t        = [''flt'']
'''Parameter'''
+
| p1d        = Floating-point value in degrees
: [''var'']
+
| p2t        = [''var'']
:: Variable to store the floating-point result
+
| p2d        = Variable to store the result, a floating-point value
: [''flt'']
+
| native      = [[SIN]]
:: Floating-point value in degrees
+
}}
'''Native analog'''
 
: [[SIN]]
 
  
 
This opcode takes the sine of the floating-point value in degrees and stores the result into a variable. The result will always be between ''-1.0'' and ''1.0''. Internally, the game converts the value to radians (3.1415927 &times; value &times; 0.0055555557), then takes sine of that in radians.
 
This opcode takes the sine of the floating-point value in degrees and stores the result into a variable. The result will always be between ''-1.0'' and ''1.0''. Internally, the game converts the value to radians (3.1415927 &times; value &times; 0.0055555557), then takes sine of that in radians.
  
 
== Keywords ==
 
== Keywords ==
math, sin, sine
+
{{K|math}}, sin, sine
  
 
== See also ==
 
== See also ==
* [[02F7]], cosine
+
* {{Icon|t}} [[02F7]], cosine
 
 
[[Category:OpCodes]]
 

Latest revision as of 04:19, 20 December 2016

GTA III Vice City San Andreas SIN


Description
Takes the sine of the floating-point value
Syntax
02F6: [var] = sine [flt]
Parameter
[flt]
Floating-point value in degrees
[var]
Variable to store the result, a floating-point value
Native analog
SIN

This opcode takes the sine of the floating-point value in degrees and stores the result into a variable. The result will always be between -1.0 and 1.0. Internally, the game converts the value to radians (3.1415927 × value × 0.0055555557), then takes sine of that in radians.

Keywords

math, sin, sine

See also