コード例 #1
0
ファイル: Complex.php プロジェクト: dbirchak/numbers.php
 /**
  * Checks for equality between this complex number and another
  * within a given range defined by epsilon.
  *
  * @param Complex $complex complex number to check this number against.
  * @param float $epsilon
  * @return bool true if equal within epsilon, false otherwise
  */
 public function equals($complex, $epsilon = Numbers::EPSILON)
 {
     return Basic::numbersEqual($this->real, $complex->real, $epsilon) && Basic::numbersEqual($this->imaginary, $complex->imaginary, $epsilon);
 }