function pImage::getLength

5.x pImage.class.php pImage::getLength($X1, $Y1, $X2, $Y2)
1 call to pImage::getLength()
pImage::getTextBox_deprecated in inc/pchart/pchart/class/pImage.class.php

File

inc/pchart/pchart/class/pImage.class.php, line 180

Class

pImage

Code

function getLength($X1, $Y1, $X2, $Y2) 
 {
  return (sqrt(pow(max($X1, $X2) -min($X1, $X2), 2) + pow(max($Y1, $Y2) -min($Y1, $Y2), 2)));
}