Skip to content

Commit 5814189

Browse files
committed
slightly improve naming for otherwise potentially confusing variable
1 parent 07d8033 commit 5814189

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/DSWaveformImage/WaveformImageDrawer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ private extension WaveformImageDrawer {
142142
let path = CGMutablePath()
143143
var maxAmplitude: CGFloat = 0.0 // we know 1 is our max in normalized data, but we keep it 'generic'
144144

145-
for (y, sample) in samples.enumerated() {
146-
var x = y + lastOffset
145+
for (index, sample) in samples.enumerated() {
146+
var x = index + lastOffset
147147
if case .striped = configuration.style, x % Int(configuration.scale) != 0 || x % stripeBucket(configuration) != 0 {
148148
// skip sub-pixels - any x value not scale aligned
149149
// skip any point that is not a multiple of our bucket width (width + spacing)

0 commit comments

Comments
 (0)