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 | 85 |
org/opentrafficsim/animation/gtu/colorer/SpeedGtuColorer.java | 59 |
if (ratio <= 0) { return this.legend.get(0).getColor(); } if (ratio >= this.legend.size() - 1) { return this.legend.get(this.legend.size() - 1).getColor(); } // Interpolate int floor = (int) Math.floor(ratio); return ColorInterpolator.interpolateColor(this.legend.get(floor).getColor(), this.legend.get(floor + 1).getColor(), ratio - floor); } /** {@inheritDoc} */ @Override public final List<LegendEntry> getLegend() { return Collections.unmodifiableList(this.legend); } /** {@inheritDoc} */ @Override public final String toString() { return "Acceleration"; |