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

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

Axiom: |projᵇA|² + |perpᵇA|² = |A|² Sum of squared lengths of proj and perp equals squared length of A
public testProjPerpSumOfSquares ( array $A, array $B )
$A array
$B array
    public function testProjPerpSumOfSquares(array $A, array $B)
    {
        $A = new Vector($A);
        $B = new Vector($B);
        $│A│² = $A->length() ** 2;
        $│projᵇA│² = $A->projection($B)->length() ** 2;
        $│perpᵇA│² = $A->perp($B)->length() ** 2;
        $this->assertEquals($│A│², $│projᵇA│² + $│perpᵇA│²);
    }