public function distance() { return Math::distance($this->start->x, $this->start->y, $this->end->x, $this->end->y); }
/** * @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)); }