Represents a two-directional vector.

const vec2 = { x: 0, y: 0 };
import { Vector2 } from "@minecraft/server";

const vec2: Vector2 = { x: 0, y: 0 };
interface Vector2 {
    x: number;
    y: number;
}

Implemented by

Properties

x y

Properties

x: number

X component of the two-dimensional vector.

y: number

Y component of the two-dimensional vector.