<commit_before>package org.notimetoplay.voxeldesc;

public class Point3D implements Comparable<Point3D> {
	public byte x = 0;
	public byte y = 0;
	public byte z = 0;
	
	public Point3D(final int nx, final int ny, final int nz) {
		x = (byte) nx;
		y = (byte) ny;
		z = (byte) nz;
	}
	
	public boolean equals(Object other) {
		try {
			final Point3D o = (Point3D) other;
			return x == o.x && y == o.y && z == o.z;
		} catch (ClassCastException e) {
			return false;
		}
	}
	
	public int hashCode() {
		return z * 65536 + y * 256 + x;
	}
	
	public String toString() {
		return String.format("Point3D(%d, %d, %d)", x, y, z);
	}
	
	public int compareTo(Point3D other) {
		if (z < other.z)
			return 1; // Sort from back to front.
		else if (z > other.z)
			return -1; // Sort from back to front.
		else if (y < other.y)
			return -1;
		else if (y > other.y)
			return 1;
		else if (x < other.x)
			return -1;
		else if (x > other.x)
			return 1;
		else
			return 0;
	}
}<commit_msg>Add minCoords() and maxCoords() static methods.<commit_after>package org.notimetoplay.voxeldesc;

public class Point3D implements Comparable<Point3D> {
	public byte x = 0;
	public byte y = 0;
	public byte z = 0;
	
	public Point3D(final int nx, final int ny, final int nz) {
		x = (byte) nx;
		y = (byte) ny;
		z = (byte) nz;
	}
	
	public boolean equals(Object other) {
		try {
			final Point3D o = (Point3D) other;
			return x == o.x && y == o.y && z == o.z;
		} catch (ClassCastException e) {
			return false;
		}
	}
	
	public int hashCode() {
		return z * 65536 + y * 256 + x;
	}
	
	public String toString() {
		return String.format("Point3D(%d, %d, %d)", x, y, z);
	}
	
	public int compareTo(Point3D other) {
		if (z < other.z)
			return 1; // Sort from back to front.
		else if (z > other.z)
			return -1; // Sort from back to front.
		else if (y < other.y)
			return -1;
		else if (y > other.y)
			return 1;
		else if (x < other.x)
			return -1;
		else if (x > other.x)
			return 1;
		else
			return 0;
	}
	
	public static Point3D minCoords(final Point3D p1, final Point3D p2) {
		return new Point3D(
			Math.min(p1.x, p2.x),
			Math.min(p1.y, p2.y),
			Math.min(p1.z, p2.z));
	}
	
	public static Point3D maxCoords(final Point3D p1, final Point3D p2) {
		return new Point3D(
			Math.max(p1.x, p2.x),
			Math.max(p1.y, p2.y),
			Math.max(p1.z, p2.z));
	}
}
{'fraction_non_alphanumeric': 0.1424294268605646, 'fraction_numerical': 0.03165098374679213, 'mean_word_length': 2.626356589147287, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6071421', 'n_tokens_mistral': 1088, 'n_tokens_neox': 952, 'n_words': 303}