Represents a two-directional vector.
const vec2 = { x: 0, y: 0 }; Copy
const vec2 = { x: 0, y: 0 };
import { Vector2 } from "@minecraft/server";const vec2: Vector2 = { x: 0, y: 0 }; Copy
import { Vector2 } from "@minecraft/server";const vec2: Vector2 = { x: 0, y: 0 };
X component of the two-dimensional vector.
Y component of the two-dimensional vector.
Represents a two-directional vector.
Example
createVector2.js
Example
createVector2.ts