Difference between revisions of "0509"
Jump to navigation
Jump to search
(Created page with '{{OpCode | ini = 0509=5,%5d% %1d% %2d% %3d% %4d% | description = Gets the distance between X,Y coordinates | p1 = X1-coordinate | p2 = Y1-coordinate | p…') |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{OpCode | {{OpCode | ||
− | | | + | | games = {{Icon|VC}} {{Icon|SA}} |
− | | description = Gets the distance between X | + | | command = GET_DISTANCE_BETWEEN_COORDS_2D |
− | | | + | | description = Gets the distance between two X and Y coordinate points |
− | | | + | | syntax1 = 0509: [''var''] = distance_between_point [''flt1''] [''flt2''] and_point [''flt3''] [''flt4''] |
− | | | + | | p1t = [''flt1''] |
− | | | + | | p1d = X1-coordinate |
− | | | + | | p2t = [''flt2''] |
− | + | | p2d = Y1-coordinate | |
+ | | p3t = [''flt3''] | ||
+ | | p3d = X2-coordinate | ||
+ | | p4t = [''flt4''] | ||
+ | | p4d = Y2-coordinate | ||
+ | | p5t = [''var''] | ||
+ | | p5d = Variable to store the distance, a floating-point value | ||
| native = [[GET_DISTANCE_BETWEEN_COORDS_2D]] | | native = [[GET_DISTANCE_BETWEEN_COORDS_2D]] | ||
}} | }} | ||
− | |||
− | |||
− | |||
− | == | + | This opcode gets the distance between two X and Y coordinate points. It uses the [[wikipedia:Distance#Geometry|distance formula]] in rectangular coordinate system to calculate the distance between the points. |
− | + | ||
− | + | == Keywords == | |
− | + | get, store, distance, between, coords, coordinates, 2d | |
+ | |||
+ | == See also == | ||
+ | * {{Icon|VC}} {{Icon|SA}} [[050A]], gets the distance between two X, Y, and Z coordinate points |
Latest revision as of 00:46, 20 November 2016
GET_DISTANCE_BETWEEN_COORDS_2D
- Description
- Gets the distance between two X and Y coordinate points
- Syntax
- 0509: [var] = distance_between_point [flt1] [flt2] and_point [flt3] [flt4]
- Parameter
- [flt1]
- X1-coordinate
- [flt2]
- Y1-coordinate
- [flt3]
- X2-coordinate
- [flt4]
- Y2-coordinate
- [var]
- Variable to store the distance, a floating-point value
- Native analog
- GET_DISTANCE_BETWEEN_COORDS_2D
This opcode gets the distance between two X and Y coordinate points. It uses the distance formula in rectangular coordinate system to calculate the distance between the points.
Keywords
get, store, distance, between, coords, coordinates, 2d
See also
050A, gets the distance between two X, Y, and Z coordinate points