even more Interp constructors
@@ -87,8 +87,6 @@ public interface Interp{
return start + (end - start) * apply(a);
}
- //
-
class Pow implements Interp{
final float power;
@@ -96,6 +94,11 @@ public interface Interp{
this.power = power;
}
+
+ public Pow(int power){
+ this.power = power;
+ }
+
@Override
public float apply(float a){
if(a <= 0.5f) return (float)Math.pow(a * 2, power) / 2;
@@ -123,6 +126,10 @@ public interface Interp{
super(power);
}
+ public PowOut(float power){
+ super(power);
+ }
+
@Override
public float apply(float a){
return (float)Math.pow(a - 1, power) * (power % 2 == 0 ? -1 : 1) + 1;
