Get mid point : Math « Dojo toolkit « JavaScript DHTML






Get mid point

 
<html>
  <head>
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
      dojo.require("dojox.math._base");
      
      function testIt() {
        var s = dojox.math.midpoint([2,2],[8,2]);
        alert(s)

      }
    </script>
  </head>
  <body onLoad="testIt();">
  </body>
</html>

   
  








Dojo-toolkit.zip( 3,849 k)

Related examples in the same category

1.Get range
2.Get gaussian random number
3.Convert radian to degree
4.Convert degree to Radians
5.Math.standard deviation
6.Calculate distance for two points