es6 refactoring

This commit is contained in:
Hakim El Hattab committed 2020-03-07 11:58:18 +01:00
1 parent 4cfd254086
commit dd852851ef
2 files changed
+55 -55

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@
*/
export const extend = ( a, b ) => {
for( var i in b ) {
for( let i in b ) {
a[ i ] = b[ i ];
}
@@ -57,7 +57,7 @@ export const deserialize = ( value ) => {
*/
export const distanceBetween = ( a, b ) => {
var dx = a.x - b.x,
let dx = a.x - b.x,
dy = a.y - b.y;
return Math.sqrt( dx*dx + dy*dy );