File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ With the following ES Modules:
213213
214214``` mjs 
215215//  distance.mjs
216- export  function  distance (a , b ) { return  ( b .x  -  a .x ) **  2  +  (b .y  -  a .y ) **  2 ; }
216+ export  function  distance (a , b ) { return  Math . sqrt (( b .x  -  a .x ) **  2  +  (b .y  -  a .y ) **  2 ) ; }
217217``` 
218218
219219``` mjs 
@@ -265,7 +265,7 @@ export default class Point {
265265
266266//  `distance` is lost to CommonJS consumers of this module, unless it's
267267//  added to `Point` as a static property.
268- export  function  distance (a , b ) { return  ( b .x  -  a .x ) **  2  +  (b .y  -  a .y ) **  2 ; }
268+ export  function  distance (a , b ) { return  Math . sqrt (( b .x  -  a .x ) **  2  +  (b .y  -  a .y ) **  2 ) ; }
269269export  { Point  as  'module .exports ' }
270270``` 
271271
@@ -289,7 +289,7 @@ named exports attached to it as properties. For example with the example above,
289289<!--  eslint-disable @stylistic/js/semi --> 
290290
291291``` mjs 
292- export  function  distance (a , b ) { return  ( b .x  -  a .x ) **  2  +  (b .y  -  a .y ) **  2 ; }
292+ export  function  distance (a , b ) { return  Math . sqrt (( b .x  -  a .x ) **  2  +  (b .y  -  a .y ) **  2 ) ; }
293293
294294export  default  class  Point  {
295295  constructor (x , y ) { this .x  =  x; this .y  =  y; }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments