Vector

Represents a two-dimensional vector.

Vector interface

Represents a two-dimensional vector.

Signature:

interface Vector

Remarks

Used for positions, sizes, scales, and other two-dimensional values

Example

const position: Vector = { x: 100, y: 200 };
const scale: Vector = { x: 2, y: 2 };

Properties

Property

Modifiers

Type

Description

x

number

X coordinate or horizontal component

y

number

Y coordinate or vertical component

Last updated: August 5, 2026 at 11:47 AMEdit this page