sivaramaiah  
 
  Record16 04/25/2024 1:25am (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

 


-----------------------------
  Offline Messages
  Adds
  Visitors Information
Today, there have been 119800 visitors (281694 hits) on this page!
-------------------------------------------------- This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free