Get the distance between two points - Node.js Geometry

Node.js examples for Geometry:Distance

Description

Get the distance between two points

Demo Code

  
  Math.distance = function(x0, x1, y0, y1) {
    return sqrt(pow(x0-(x1+8), 2)+pow(y0-(y1+8), 2));
  };//w  w w.  jav a  2s . c  om

Related Tutorials