note 38204 added to ref.math

From: Date: Thu, 11 Dec 2003 19:50:36 +0000
Subject: note 38204 added to ref.math
Groups: php.notes 
Request: Send a blank email to php-notes+get-61831@lists.php.net to get a copy of this message
Simple Midpoint function for calculating the distance between two points on a coordinate plane <?php function midpoint($x1,$x2,$y1,$y2){ $x = $x1 + $x2; $y = $y1 + $y2; $xf = $x / 2; $yf = $y / 2; echo "The midpoint (x,y) is ($xf,$yf)"; } midpoint(10,20,2,2); //Returns The midpoint (x,y) is (15,2) ?> Enjoy! ---- Manual Page -- http://www.php.net/manual/en/ref.math.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38204 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38204&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38204&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#61831) next »