示例#1
0
文件: LineTest.php 项目: tarcisio/p2d
 /**
  * @covers tarcisio\p2d\Line::slope
  */
 public function testSlope()
 {
     $line = new Line(10, 10, 20, 20);
     $this->assertEquals(1, $line->slope());
     $line = new Line(10, 10, 20, 5);
     $this->assertEquals(-0.5, $line->slope());
 }