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

# Factorio Runtime Docs Version 2.0.77

# Vector - Runtime Docs

## Vector :: table or {float, float}

A vector is a two-element array or dictionary containing the `x` and `y` components. The game will always provide the array format. Positive x goes east, positive y goes south.

#### Table fields

x | :: float |
y | :: float |

#### Example

    right = {1.0, 0.0}

Concept used in

- LuaEntity::get_movement()
- LuaEntity::set_movement()
- LuaEntity::follow_offset
- LuaEntityPrototype::created_smoke
- LuaEntityPrototype::fluid_source_offset
- LuaEntityPrototype::inserter_pickup_position
- LuaEntityPrototype::inserter_drop_position
- LuaEntityPrototype::alert_icon_shift
- LuaEntityPrototype::logistic_parameters
- LuaEntityPrototype::vector_to_place_result
- LuaEquipmentPrototype::logistic_parameters
- LuaRenderObject::oriented_offset
- LuaRendering::draw_sprite()
- LuaRendering::draw_animation()
- LuaSpacePlatform::eject_item()
- LuaSurface::create_entity()
- LuaSurface::create_particle()
- LuaSurface::clone_entities()
- AsteroidChunk
- AttackParameters
- BlueprintEntity
- CircularParticleCreationSpecification
- CircularProjectileCreationSpecification
- EjectedItem
- ExplosionDefinition
- GunShift4Way
- HeatConnection
- IconDrawSpecification
- IconSequencePositioning
- RadiusVisualisationSpecification
- ScriptRenderTargetTable
- SmokeSource
- SpiderLegSpecification
- TriggerDelivery
- TriggerEffectItem