Calculate distance for two points : Math « Dojo toolkit « JavaScript DHTML

Calculate distance for two points


    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
      function testIt() {
        var s = dojox.math.distance([2,2],[4,2]);

  <body onLoad="testIt();">

  3,849 k)

Related examples in the same category

1.Get mid point
2.Get range
3.Get gaussian random number
4.Convert radian to degree
5.Convert degree to Radians
6.Math.standard deviation