export default class Vector {
    static new(x, y, z) {
        return { x: x, y: y, z: z };
    }
    static equals(a, b) {
        if (a.x == b.x && a.y == b.y && a.z == b.z) {
            return true;
        }
        return false;
    }
    static magnitude(a) {
        return Math.abs(Math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z));
    }
    static magnitude_Squared(a) {
        return a.x * a.x + a.y * a.y + a.z * a.z;
    }
    static normalized(a) {
        const magnitude = this.magnitude(a);
        return this.divide(a, magnitude);
    }
    static add(a, b) {
        return { x: a.x + b.x, y: a.y + b.y, z: a.z + b.z };
    }
    static cross(a, b) {
        const i = a.y * b.z - a.z * b.y;
        const j = a.x * b.z - a.z * b.x;
        const k = a.x * b.y - a.y * b.x;
        return { x: i, y: j, z: k };
    }
    static dot(a, b) {
        return a.x * b.x + a.y * b.y + a.z * b.z;
    }
    static angle(a, b, Degrees) {
        const dot = this.dot(a, b);
        const a_Mag = this.magnitude(a);
        const b_Mag = this.magnitude(b);
        let degrees = 1;
        if (Degrees)
            degrees = 57.2958;
        return Math.acos(dot / (a_Mag * b_Mag)) * degrees;
    }
    static distance(a, b) {
        const i = (a.x - b.x) * (a.x - b.x);
        const j = (a.y - b.y) * (a.y - b.y);
        const k = (a.z - b.z) * (a.z - b.z);
        return Math.abs(Math.sqrt(i + j + k));
    }
    static divide(a, b) {
        if (typeof b == "number") {
            return { x: a.x / b, y: a.y / b, z: a.z / b };
        }
        return { x: a.x / b.x, y: a.y / b.y, z: a.z / b.z };
    }
    static lerp(a, b, t) {
        const distance = this.multiply(this.subtract(b, a), t);
        return this.add(a, distance);
    }
    static max(a, b) {
        return { x: 0, y: 0, z: 0 };
    }
    static min(a, b) {
        return { x: 0, y: 0, z: 0 };
    }
    static multiply(a, b) {
        if (typeof b == "number") {
            return { x: a.x * b, y: a.y * b, z: a.z * b };
        }
        return { x: a.x * b.x, y: a.y * b.y, z: a.z * b.z };
    }
    static slerp(a, b, s) {
        const distance = this.multiply(this.subtract(b, a), s);
        return this.add(a, distance);
    }
    static subtract(a, b) {
        return { x: a.x - b.x, y: a.y - b.y, z: a.z - b.z };
    }
    static quadrant(a) {
        if (a.x < 0 && a.z > 0) {
            return 3;
        }
        else if (a.x < 0 && a.z < 0) {
            return 4;
        }
        else if (a.x > 0 && a.z < 0) {
            return 1;
        }
        return 2;
    }
}
Vector.back = { x: 0, y: 0, z: -1 };
Vector.down = { x: 0, y: -1, z: 0 };
Vector.forward = { x: 0, y: 0, z: 1 };
Vector.left = { x: -1, y: 0, z: 0 };
Vector.one = { x: 1, y: 1, z: 1 };
Vector.right = { x: 1, y: 0, z: 0 };
Vector.up = { x: 0, y: 1, z: 0 };
Vector.zero = { x: 0, y: 0, z: 0 };
