SponsorBlock: Fixed rounding issue when marking segments

This commit is contained in:
polymorphicshade 2020-09-05 22:25:02 -06:00
parent 62b109171c
commit 844dc53220

View file

@ -6,7 +6,6 @@ public class SeekBarMarker {
public double percentStart; public double percentStart;
public double percentEnd; public double percentEnd;
public int color; public int color;
public Object tag;
public SeekBarMarker(final double startTime, public SeekBarMarker(final double startTime,
final double endTime, final double endTime,
@ -14,8 +13,8 @@ public class SeekBarMarker {
final int color) { final int color) {
this.startTime = startTime; this.startTime = startTime;
this.endTime = endTime; this.endTime = endTime;
this.percentStart = Math.round((startTime / maxTime) * 100.0) / 100.0; this.percentStart = ((startTime / maxTime) * 100.0) / 100.0;
this.percentEnd = Math.round((endTime / maxTime) * 100.0) / 100.0; this.percentEnd = ((endTime / maxTime) * 100.0) / 100.0;
this.color = color; this.color = color;
} }