Esempio n. 1
0
 public function distance()
 {
     return Math::distance($this->start->x, $this->start->y, $this->end->x, $this->end->y);
 }
Esempio n. 2
0
 /**
  * @covers tarcisio\p2d\Math::distance
  */
 public function testDistance()
 {
     $p1 = new Point(0, 0);
     $p2 = new Point(10, 0);
     $this->assertEquals(10, Math::distance($p1->x, $p1->y, $p2->x, $p2->y));
 }