Toggle navigation
Home
com.speedment.runtime.compute.ToDouble to com.speedment.runtime.compute.ToInt
No. of Instances - 1
No. of Commits - 1
No. of Projects - {'speedment'}
Hierarchy/Composition: SIBLING
Primitive Info: -
NameSpace: Internal -> Internal
Mapping:
Cascading Type Change (Similar)
ToIntPower<T,ToDouble<T>>
to
ToIntPower<T,ToInt<T>>
Add or Remove Method invocation
inner.applyAsDouble(object)
to
inner.applyAsInt(object)
Update Anonymous class
{ @Override public double applyAsDouble( T object){ final int p=power.applyAsInt(object); if (p == 0) return 1; final double value=inner.applyAsDouble(object); switch (p) { case 1: return value; case 2: return value * value; case 3: return value * value * value; case 4: return value * value * value* value; case 5: return value * value * value* value* value; case -1: return 1 / value; default : return Math.pow(value,p); } } }
to
{ @Override public double applyAsDouble( T object){ final int p=power.applyAsInt(object); if (p == 0) return 1; final int value=inner.applyAsInt(object); switch (p) { case 1: return value; case 2: return value * value; case 3: return value * value * value; case 4: return value * value * value* value; case 5: return value * value * value* value* value; case -1: return 1 / value; default : return Math.pow(value,p); } } }