struct

Godot::Vector2i

Inherits Struct < Value < Object

2-element structure that can be used to represent 2D grid coordinates or discrete positions with 32-bit integers.

Constants

DOWN = Vector2i.new(0, 1)
LEFT = Vector2i.new(-1, 0)
ONE = Vector2i.new(1, 1)
RIGHT = Vector2i.new(1, 0)
UP = Vector2i.new(0, -1)
ZERO = Vector2i.new(0, 0)

Constructors

new(x : Int32 = 0, y : Int32 = 0)
Source
new(x : Number, y : Number)
Source
new(pointer : Pointer(Void))
Source

Instance methods

*(scalar : Number) : Vector2i
Source
/(scalar : Number) : Vector2i
Source
clamp(min : Vector2i, max : Vector2i) : Vector2i
Source
max(other : Vector2i) : Vector2i
Source
min(other : Vector2i) : Vector2i
Source
sign
Source
to_s(io : IO) : Void

Same as #inspect(io).

Source
to_v2
Source
x=(x : Int32)
Source
y=(y : Int32)
Source