コード例 #1
0
ファイル: Rational.php プロジェクト: bound1ess/php-math
 /**
  * @param Rational $value
  * @return Rational
  */
 public function subtract(Rational $value) : Rational
 {
     $coef = new static(integer(-1), integer(1));
     return $this->add($value->multiply($coef));
 }