Browse Source

Merge branch 'master' of https://git.tk.informatik.tu-darmstadt.de/scm-ssi-student-hostagev2

Julien Clauter 11 years ago
parent
commit
ece4e98a47

+ 2 - 2
src/de/tudarmstadt/informatik/hostage/ui2/helper/ColorSequenceGenerator.java

@@ -1,13 +1,14 @@
 package de.tudarmstadt.informatik.hostage.ui2.helper;
 
 import android.graphics.Color;
+import android.util.Log;
 
 /**
  * Idea from http://ridiculousfish.com/blog/posts/colors.html
  * Created by Fabio Arnold on 25.02.14.
  */
 public class ColorSequenceGenerator {
-	private static final int BIT_COUNT = 31; // sadly there is no unsigned type in java
+	private static final int BIT_COUNT = 30; // sadly there is no unsigned type in java
 	public static int getColorForIndex(int index) {
 		int reverseIndex = 0;
 		for (int i = 0; i  < BIT_COUNT; i++) {
@@ -16,7 +17,6 @@ public class ColorSequenceGenerator {
 		}
 		float hue = ((float)reverseIndex / (float)(1 << BIT_COUNT) + 0.6f) % 1.0f;
 
-
 		float[] hsv = new float[3];
 		hsv[0] = 360.0f * hue;
 		hsv[1] = 0.7f; // not fully saturated