MathPHP\LinearAlgebra\VectorAxiomsTest::testProjPerpSumEqualsA PHP Метод

testProjPerpSumEqualsA() публичный Метод

Axiom: projᵇA + perpᵇA = A Sum of the proj and perp of A on B equals A
public testProjPerpSumEqualsA ( array $A, array $B )
$A array
$B array
    public function testProjPerpSumEqualsA(array $A, array $B)
    {
        $A = new Vector($A);
        $B = new Vector($B);
        $projᵇA = $A->projection($B);
        $perpᵇA = $A->perp($B);
        $projᵇA+perpᵇA = $projᵇA->add($perpᵇA);
        $this->assertEquals($A, $projᵇA+perpᵇA);
        $this->assertEquals($A->getVector(), $projᵇA+perpᵇA->getVector());
    }