<commit_before>part of minecraft;

class Position {
  final World world;
  final int x;
  final int y;
  final int z;

  Position(this.world, this.x, this.y, this.z);

  bool operator ==(Position other) {
    return other.world == world && other.x == x; other.y == y && other.z == z;
  }

  Position operator +(Position other) {
    if (other.world != world) {
      throw new Exception("Worlds must be equal to add positions together");
    }
    int nx = x + other.x;
    int ny = y + other.y;
    int nz = z + other.z;
    return new Position(world, nx, ny, nz);
  }

  Position operator -(Position other) {
    if (other.world != world) {
      throw new Exception("Worlds must be equal to subtract positions from each other");
    }
    int nx = x - other.x;
    int ny = y - other.y;
    int nz = z - other.z;
    return new Position(world, nx, ny, nz);
  }
}<commit_msg>Add * and / operators for position<commit_after>part of minecraft;

class Position {
  final World world;
  final int x;
  final int y;
  final int z;

  Position(this.world, this.x, this.y, this.z);

  bool operator ==(Position other) {
    return other.world == world && other.x == x; other.y == y && other.z == z;
  }

  Position operator +(Position other) {
    if (other.world != world) {
      throw new Exception("Worlds must be equal to add positions together");
    }
    int nx = x + other.x;
    int ny = y + other.y;
    int nz = z + other.z;
    return new Position(world, nx, ny, nz);
  }

  Position operator -(Position other) {
    if (other.world != world) {
      throw new Exception("Worlds must be equal to subtract positions from each other");
    }
    int nx = x - other.x;
    int ny = y - other.y;
    int nz = z - other.z;
    return new Position(world, nx, ny, nz);
  }

  Position operator *(Position other) {
    if (other.world != world) {
      throw new Exception("Worlds must be equal to subtract positions from each other");
    }
    int nx = x * other.x;
    int ny = y * other.y;
    int nz = z * other.z;
    return new Position(world, nx, ny, nz);
  }

  Position operator /(Position other) {
    if (other.world != world) {
      throw new Exception("Worlds must be equal to subtract positions from each other");
    }
    int nx = x / other.x;
    int ny = y / other.y;
    int nz = z / other.z;
    return new Position(world, nx, ny, nz);
  }
}
{'fraction_non_alphanumeric': 0.12695725772323319, 'fraction_numerical': 0.0, 'mean_word_length': 2.466275659824047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1739404', 'n_tokens_mistral': 800, 'n_tokens_neox': 782, 'n_words': 290}