CPD Results
The following document contains the results of PMD's CPD 7.3.0.
Duplications
| File | Line |
|---|---|
| org/opentrafficsim/animation/gtu/colorer/AccelerationGtuColorer.java | 83 |
| org/opentrafficsim/animation/gtu/colorer/SpeedGtuColorer.java | 58 |
if (ratio <= 0)
{
return this.legend.get(0).color();
}
if (ratio >= this.legend.size() - 1)
{
return this.legend.get(this.legend.size() - 1).color();
}
// Interpolate
int floor = (int) Math.floor(ratio);
return ColorInterpolator.interpolateColor(this.legend.get(floor).color(), this.legend.get(floor + 1).color(),
ratio - floor);
}
@Override
public final List<LegendEntry> getLegend()
{
return Collections.unmodifiableList(this.legend);
}
@Override
public final String getName()
{
return "Acceleration"; | |
