Library

Vector2

table

Constructor and helpers for the Vector2 datatype.

Properties

4
NameTypeAccessDescription
zeroVector2read

The Vector2 (0, 0). See https://create.roblox.com/docs/reference/engine/datatypes/Vector2#zero.

since 1.2.0-alpha
oneVector2read

The Vector2 (1, 1). See https://create.roblox.com/docs/reference/engine/datatypes/Vector2#one.

since 1.2.0-alpha
xAxisVector2read

The Vector2 (1, 0). See https://create.roblox.com/docs/reference/engine/datatypes/Vector2#xAxis.

since 1.2.0-alpha
yAxisVector2read

The Vector2 (0, 1). See https://create.roblox.com/docs/reference/engine/datatypes/Vector2#yAxis.

since 1.2.0-alpha

Functions

1

#Vector2.new(x: number?, y: number?) → Vector2

since 1.2.0-alpha

Creates a Vector2 with components (x, y) (both default to 0).

Parameters

xnumber?

X component.

ynumber?

Y component.