Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# MapPosition - Prototype Docs

## MapPosition :: struct or {double, double} Example code

Coordinates of a tile in a map. Positive x goes towards east, positive y goes towards south, and x is the first dimension in the array format.

The coordinates are stored as a fixed-size 32 bit integer, with 8 bits reserved for decimal precision, meaning the smallest value step is `1/2^8 = 0.00390625` tiles.

## Properties

- default
- sorted

x | :: double |
y | :: double |

x | :: double |
y | :: double |

## Properties

### x :: double

### y :: double

## Examples

    -- Explicit definition
    {x = 5.5, y = 2}
    {y = 2.25, x = 5.125}

    -- Shorthand
    {1.625, 2.375}

Type used in

- BoundingBox::left_top
- BoundingBox::right_bottom
- BoundingBox
- ElementImageSetLayer::position
- HeatConnection::position
- LightningAttractorPrototype::lightning_strike_offset
- MapGenSettings::starting_points
- MapLocation::position
- PipeConnectionDefinition::position
- PipeConnectionDefinition::positions
- RailSignalStaticSpriteLayer::shifts
- SimpleBoundingBox::left_top
- SimpleBoundingBox::right_bottom
- SimpleBoundingBox