trace() public method

public trace ( ) : float
return float
Example #1
0
 public function testTrace()
 {
     $matrix = new Matrix([[1, 2, 3], [0, 1, 4], [5, 6, 0]]);
     static::assertEquals(2, $matrix->trace());
 }