ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/common/utilities/VisualHelper.java
2020-11-29 16:58:41 +00:00

13 lines
554 B
Java

package de.ellpeck.actuallyadditions.common.utilities;
public class VisualHelper {
/**
* Stolen from Ell's original code, because lazy. What does it do? Something with wheels? (It's an RGB selector)
*/
public static float[] getWheelColor(float pos) {
if (pos < 85.0f) { return new float[] { pos * 3.0F, 255.0f - pos * 3.0f, 0.0f }; }
if (pos < 170.0f) { return new float[] { 255.0f - (pos -= 85.0f) * 3.0f, 0.0f, pos * 3.0f }; }
return new float[] { 0.0f, (pos -= 170.0f) * 3.0f, 255.0f - pos * 3.0f };
}
}