From 9d91d6d98c645812435c219d1af2e2de69fa413c Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 14 Jan 2014 20:50:51 +0200 Subject: [PATCH] Add drawutils class --- src/com/annimon/influencexxii/DrawUtils.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/com/annimon/influencexxii/DrawUtils.java diff --git a/src/com/annimon/influencexxii/DrawUtils.java b/src/com/annimon/influencexxii/DrawUtils.java new file mode 100644 index 0000000..2eb55d2 --- /dev/null +++ b/src/com/annimon/influencexxii/DrawUtils.java @@ -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); + } +} \ No newline at end of file