Posted By

Phoenicia7 on 05/14/12


Tagged


Versions (?)

Length 2D


 / Published in: TCL
 

  1. proc _length2d {x1 y1 x2 y2} {
  2. # Procedure to determine 2d length of a 2 point line.
  3. set length2d [expr sqrt((($x2 - $x1) * ($x2 - $x1)) + (($y2 - $y1) * ($y2 - $y1)))]
  4. return $length2d
  5. }
  6.  

Report this snippet  

You need to login to post a comment.