Add drawutils class

This commit is contained in:
Victor 2014-01-14 20:50:51 +02:00
parent 64e50c3c2e
commit 9d91d6d98c

View File

@ -0,0 +1,19 @@
package com.annimon.influencexxii;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.MathUtils;
/**
* Simple functions for drawing
* @author aNNiMON
*
*/
public class DrawUtils {
public static Color random2Color(int min, int max) {
float r = MathUtils.random(min, max) / 255f;;
float g = MathUtils.random(min, max) / 255f;
float b = MathUtils.random(min, max) / 255f;;
return new Color(r, g, b, 1f);
}
}