Difference between revisions of "02F7"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with "{{Icon|trilogy}} '''COS''' <hr /> '''Description''' : Takes the cosine of the floating-point value '''Syntax''' : 02F7: [''var''] = cosine [''flt''] '''Parameter''' : [''var''...")
 
Line 6: Line 6:
 
: 02F7: [''var''] = cosine [''flt'']
 
: 02F7: [''var''] = cosine [''flt'']
 
'''Parameter'''
 
'''Parameter'''
 +
: [''flt'']
 +
:: Floating-point value in degrees
 
: [''var'']
 
: [''var'']
 
:: Variable to store the floating-point result
 
:: Variable to store the floating-point result
: [''flt'']
 
:: Floating-point value in degrees
 
 
'''Native analog'''
 
'''Native analog'''
 
: [[COS]]
 
: [[COS]]

Revision as of 00:28, 20 November 2016

GTA III Vice City San Andreas COS


Description

Takes the cosine of the floating-point value

Syntax

02F7: [var] = cosine [flt]

Parameter

[flt]
Floating-point value in degrees
[var]
Variable to store the floating-point result

Native analog

COS

This opcode takes the cosine 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 cosine of that in radians.

Keywords

math, cos, cosine

See also