// Calculating the step size for each iteration
const stepSize = topmostChordPos / circlesPerHalf;
// Loop from topmostChordPos down to 0
for (let i = topmostChordPos; i > 0; i -= stepSize) {
// Adding current position (positive and negative) to the chordYPositions array
chordYPositions.push(i);
chordYPositions.push(-i);
}
Associated Context | |
---|---|
Type | Code Snippet ( .ts ) |
Associated Tags | cirq |
Description | 'No Description Provided' |
Related Links | https://github.com/davidmerwin http://quantumai.google/cirq |
Related People | David Merwin, CIRQ |
Sensitive Information | No Sensitive Information Detected |
Shareable Link | https://davidmerwin.pieces.cloud/?p=1196469b39 |