Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
[0, height * 0.2],
[width * 0.18, height * 0.2],
[width * 0.2, height * 0.4],
[width * 0.25, height * 0.4],
[width * 0.27, height * 0.6],
[width * 0.72, height * 0.6],
[width * 0.75, height * 0.4],
[width * 0.8, height * 0.4],
[width * 0.82, height * 0.2],
[width, height * 0.2]
]
let line2Points = [[width * 0.3, height * 0.8], [width * 0.7, height * 0.8]]
const line1Length = getPolylineLength(line1Points)
const line2Length = getPolylineLength(line2Points)
line1Points = line1Points.map(point => point.join(',')).join(' ')
line2Points = line2Points.map(point => point.join(',')).join(' ')
return { line1Points, line2Points, line1Length, line2Length }
}
let line1Points = [
[0, height * 0.2],
[width * 0.18, height * 0.2],
[width * 0.2, height * 0.4],
[width * 0.25, height * 0.4],
[width * 0.27, height * 0.6],
[width * 0.72, height * 0.6],
[width * 0.75, height * 0.4],
[width * 0.8, height * 0.4],
[width * 0.82, height * 0.2],
[width, height * 0.2]
]
let line2Points = [[width * 0.3, height * 0.8], [width * 0.7, height * 0.8]]
const line1Length = getPolylineLength(line1Points)
const line2Length = getPolylineLength(line2Points)
line1Points = line1Points.map(point => point.join(',')).join(' ')
line2Points = line2Points.map(point => point.join(',')).join(' ')
return { line1Points, line2Points, line1Length, line2Length }
}