コード例 #1
0
ファイル: Point2D.php プロジェクト: phpalgorithms/graphtools
 /**
  * Move point by sent value.
  *
  * @param int|float $x Move vector on OX axis.
  * @param int|float $y Move vector on OY axis.
  * @return Point2D Method returns current object instance.
  */
 public function move($x = 0, $y = 0)
 {
     parent::move($x);
     $this->checkY($y);
     $this->y += $y;
     return $this;
 }
コード例 #2
0
 public function testPoint1DLowerDimension()
 {
     $point1D = new Point1D(17);
     $this->assertInstanceOf(AbstractPoint::class, $point1D->lowerDimension());
 }