We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17cd6ee commit cf37c8cCopy full SHA for cf37c8c
examples/javascript/PitchDetection/PitchDetection_Game/sketch.js
@@ -112,7 +112,7 @@ function draw() {
112
}
113
114
function dist(x1, y1, x2, y2) {
115
- return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2));
+ return Math.sqrt(((x2 - x1) ** 2) + ((y2 - y1) ** 2));
116
117
118
function gameReset() {
@@ -152,4 +152,4 @@ function createCanvas(w, h) {
152
canvas.fillStyle = '#ebedef'
153
canvas.fillRect(0, 0, w, h);
154
return canvas;
155
-}
+}
0 commit comments