export class Vector3 {
  static multiply(a, b) {
    return {
      x: (a.x ?? 0) * (b.x ?? 0),
      y: (a.y ?? 0) * (b.y ?? 0), 
      z: (a.z ?? 0) * (b.z ?? 0)
    };
  }

  static add(a, b) {
    return {
      x: (a.x ?? 0) + (b.x ?? 0),
      y: (a.y ?? 0) + (b.y ?? 0),
      z: (a.z ?? 0) + (b.z ?? 0)
    };
  }

  static subtract(a, b) {
    return {
      x: (a.x ?? 0) - (b.x ?? 0),
      y: (a.y ?? 0) - (b.y ?? 0),
      z: (a.z ?? 0) - (b.z ?? 0)
    };
  }

  static scale(vector, scalar) {
    return {
      x: vector.x * scalar,
      y: vector.y * scalar,
      z: vector.z * scalar
    };
  }
} 