Fix syntax error
This commit is contained in:
@ -121,7 +121,7 @@ var difference = (arr, values) =>
|
|||||||
Use `Math.pow()` and `Math.sqrt()` to calculate the Euclidean distance between two points.
|
Use `Math.pow()` and `Math.sqrt()` to calculate the Euclidean distance between two points.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var distance = x0, y0, x1, y1 =>
|
var distance = (x0, y0, x1, y1) =>
|
||||||
Math.sqrt(Math.pow(x1-x0, 2) + Math.pow(y1 - y0, 2))
|
Math.sqrt(Math.pow(x1-x0, 2) + Math.pow(y1 - y0, 2))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,6 @@
|
|||||||
Use `Math.pow()` and `Math.sqrt()` to calculate the Euclidean distance between two points.
|
Use `Math.pow()` and `Math.sqrt()` to calculate the Euclidean distance between two points.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var distance = x0, y0, x1, y1 =>
|
var distance = (x0, y0, x1, y1) =>
|
||||||
Math.sqrt(Math.pow(x1-x0, 2) + Math.pow(y1 - y0, 2))
|
Math.sqrt(Math.pow(x1-x0, 2) + Math.pow(y1 - y0, 2))
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user