public static float interpolateAngle(float src, float dest, float delta) { src = wrapAngle(src); dest = wrapAngle(dest); if (Math.abs(src - dest) > MathHelper.PI) src += dest < src ? -MathHelper.TWO_PI : MathHelper.TWO_PI; if (src < dest) src = Math.min(src + delta, dest); else src = Math.max(src - delta, dest); return MathHelper.wrapAngle(src); }
private void updateColor() { eventLayer.setBackgroundColor(0, 0, 0, MathHelper.clamp(current, 0, 1)); }