public static int cmp(@Nonnull Number left, @Nonnull Number right) {
		// Check for widest types first, go down the type list to narrower types until reaching int.
		if (right instanceof Double || left instanceof Double) {
			return Double.compare(left.doubleValue(), right.doubleValue());
		} else if (right instanceof Float || left instanceof Float) {
			return Float.compare(left.floatValue(), right.floatValue());
		} else if (right instanceof Long || left instanceof Long) {
			return Long.compare(left.longValue(), right.longValue());
		} else {
			return Integer.compare(left.intValue(), right.intValue());
		}
	}
Compare two numeric values, regardless of their type.

@param right
		First value.
@param left
		Second value.

@return Comparison of {@code X.compare(left, right)}
recaf-core/src/main/java/software/coley/recaf/util/NumberUtil.java