Commit f86b4bec authored by KingRainbow44's avatar KingRainbow44
Browse files

Reformat

parent 269149bb
......@@ -146,22 +146,12 @@ public final class Utils {
Files.copy(stream, new File(destination).toPath(), StandardCopyOption.REPLACE_EXISTING);
return true;
} catch (Exception e) {
Grasscutter.getLogger().warn("Unable to copy resource " + resource + " to " + destination, e);
} catch (Exception exception) {
Grasscutter.getLogger().warn("Unable to copy resource " + resource + " to " + destination, exception);
return false;
}
}
/**
* Get object with null fallback.
* @param nonNull The object to return if not null.
* @param fallback The object to return if null.
* @return One of the two provided objects.
*/
public static <T> T requireNonNullElseGet(T nonNull, T fallback) {
return nonNull != null ? nonNull : fallback;
}
/**
* Logs an object to the console.
* @param object The object to log.
......@@ -276,7 +266,7 @@ public final class Utils {
/**
* Performs a linear interpolation using a table of fixed points to create an effective piecewise f(x) = y function.
* @param x
* @param x The x value.
* @param xyArray Array of points in [[x0,y0], ... [xN, yN]] format
* @return f(x) = y
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment