Flamboyant Refabricated Integration (WIP)

This commit is contained in:
paulevsGitch 2021-03-24 22:25:34 +03:00
parent a2ca5fe3df
commit b933b0e522
9 changed files with 128 additions and 17 deletions

View file

@ -15,6 +15,13 @@ public class MHelper {
public static int color(int r, int g, int b) {
return ALPHA | (r << 16) | (g << 8) | b;
}
public static int color(String hex) {
int r = Integer.parseInt(hex.substring(0, 2), 16);
int g = Integer.parseInt(hex.substring(2, 4), 16);
int b = Integer.parseInt(hex.substring(4, 6), 16);
return color(r, g, b);
}
public static int randRange(int min, int max, Random random) {
return min + random.nextInt(max - min + 1);