sivaramaiah  
 
  Record16 11/22/2017 3:32am (UTC)
   
 
Record 16: Calculating distance between two points

function getDistance(x0,y0,x1,y1)
{
var dx=x1-x0;
var dy=y1-y0;
var sqr=Math.pow(dx,2)+Math.pow(dy,2);
return (Math.sqrt(sqr));
}
var a=15,b=26,c=18,d=30;
trace("The distance between ("+a+","+b+") and ("+c+","+d+")     points        is:"+getDistance(a,b,c,d));

---------------------------------------------------------------------------------
output
-------------------------------------------------------------------------------
The distance between (15,26) and (18,30) points is:5
 
  Menu Items
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

  add
HOT TOPICS
MCA PROJECT DETAILS ------------------------------------- Jntu all Lab manuals ------------------------------------- Jntu Syllabus Books ------------------------------------- Paper presentations ------------------------------------- Seminars ------------------------------------- Campus Papers ------------------------------------- Competetive Exams GATE ------------------------------------- GRE ------------------------------------- TOEFL ------------------------------------- IELTS ------------------------------------- CAT ------------------------------------- GMAT ------------------------------------- Templates ------------------------------------- Students Resume Preparation tips ------------------------------------- Job zone(Interview questions) ------------------------------------- Google Adsence html code ------------------------------------- Web sites --------x--------------x-----------
  Advertisement
  Advertisement

 


-----------------------------
  Offline Messages
  Adds
  Visitors Information
Today, there have been 67422 visitors (190439 hits) on this page!
=> Do you also want a homepage for free? Then click here! <= --------------------------------------------------